TransformManager
TransformManager allows managing transforms (4x4 matrices) for entities.
Entities can have a transform component that defines their position, rotation, and scale in world space. Transforms can be organized in a hierarchy where each entity can have a parent, allowing relative transformations.
The TransformManager maintains the transform hierarchy and automatically computes world transforms from local transforms and parent transforms. Matrices are 16 values in column-major order.
See also
, Scene
Properties
Functions
Commits the local transform transaction and updates all world transforms.
Creates a transform component and associates it with the given entity. If this component already exists on the entity, it is first destroyed as if destroy was called.
Double-precision create.
Creates a transform component, initialized with localTransform (relative to the parent).
Returns the number of children of a transform component.
Gets up to children.size children of a transform component.
Retrieves the Entity of the component from its Instance i.
Gets an Instance representing the transform component associated with the given Entity.
Returns the parent of a transform component, or NULL_ENTITY if it has none.
Returns the local transform of a transform component (relative to the parent).
Double-precision getTransform.
Returns the world transform of a transform component.
Double-precision getWorldTransform.
Returns whether a particular Entity is associated with a component of this TransformManager.
Opens a local transform transaction: setTransform then doesn't update world transforms until commitLocalTransformTransaction, which is faster when setting many of them.
Re-parents an entity to a new one. Re-parenting to a descendant is undefined behaviour.
Double-precision setTransform.
Sets a local transform of a transform component (relative to the parent).