Scripting API

Scripting API

HandlePlacement

Struct in Abyss.Core, from Abyss.Core.

One picked entity, as the editor's move, rotate, scale and rect handles move it: its own transform, where it is in the world and where its parent is, the box round what it and what is under it draw, and the box round what it draws itself, with what its sprite is.

public readonly struct HandlePlacement

Remarks

Laid out as abyss_core::handle::Placement is, 224 bytes.

Properties

Entity

public ulong Entity { get; init; }

The entity, packed as the engine packs one.

UnderPicked

public bool UnderPicked { get; init; }

Whether something else picked is above it in the hierarchy, so a handle moves it by moving that: only the topmost of what is picked is moved, so nothing is moved twice.

Bounded

public bool Bounded { get; init; }

Whether it, or anything under it, draws: HandlePlacement.Low and HandlePlacement.High say where.

Translation

public Vector3 Translation { get; init; }

Where it is from its parent.

Rotation

public Quaternion Rotation { get; init; }

How it is turned from its parent.

Scale

public Vector3 Scale { get; init; }

How it is scaled.

World

public Affine World { get; init; }

Where it is in the world.

Parent

public Affine Parent { get; init; }

Where its parent is in the world: the world's own axes for one with none.

Low

public Vector3 Low { get; init; }

The low corner of the box, in the world, round what it and what is under it draw.

High

public Vector3 High { get; init; }

The high corner.

DrawsItself

public bool DrawsItself { get; init; }

Whether it draws itself, as the outline does: HandlePlacement.OwnCenter and HandlePlacement.OwnHalf say where, in its own space.

Sprite

public PlacedSprite Sprite { get; init; }

What its sprite is; PlacedSprite.None for an entity with no sprite.

OwnCenter

public Vector3 OwnCenter { get; init; }

The middle of the box round what it draws itself, in its own space: a mesh's box, a sprite's rectangle.

OwnHalf

public Vector3 OwnHalf { get; init; }

Half the box's size, each way.

Anchor

public Vector2 Anchor { get; init; }

Its sprite's pivot, Bevy's Anchor: from zero at its middle to a half at an edge, up being up.

SpriteSize

public Vector2 SpriteSize { get; init; }

The size its sprite is drawn at: the size it is given, or its image's.