Component that manages the position, size, and rotation of an Actor. Provides transformation utilities and world transform computation.
TransformComponent(Actor* pOwner, Vector3D position, Vector3D size, Quaternion rotation);
Constructor of a tranform component.
You don't need to add one to an actor by default every actor has one.
by default the position, size and rotation will take what was put in the Actor constuctor.
Vector3D GetPosition();
Returns the actor location.
Vector3D GetSize();
Returns the actor size.
Quaternion GetRotation();
Returns the actor rotation.
Matrix4DRow GetWorldTransform();
Returns the Actor world transform.
void SetPosition(Vector3D newPosition);
Sets the actor location.
void Translate(Vector3D pTranslation);
Adds a location to the actual actor location.
void SetSize(Vector3D newSize);
Sets the actor size.
void SetRotation(Quaternion newRotation);
Sets the actor rotation.
void RotateX(float pAngle);
Rotates the actor around the X axis.
void RotateY(float pAngle);
Rotates the actor around the Y axis.
void RotateZ(float pAngle);
Rotates the actor around the Z axis.
Vector3D Right() const;
Returns the right vector of the actor.
Vector3D Forward() const;
Returns the forward vector of the actor.
Vector3D Up() const;
Returns the up vector of the actor.
float Pitch() const;
Returns the pitch.
float Roll() const;
Returns the roll.
float Yaw() const;
Returns the yaw.