Class TransformComponent

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class TransformComponent : public Component

Stores the transform (position, rotation, scale) information of any entity.

Public Functions

TransformComponent(Entity &owner, const JSON::json &data)
void setPosition(const Vector3 &position)
void setRotation(const float &yaw, const float &pitch, const float &roll)
void setRotationQuaternion(const Quaternion &rotation)
void setScale(const Vector3 &scale)
void setLocalTransform(const Matrix &transform)
void setAbsoluteTransform(const Matrix &transform)
void setBounds(const BoundingBox &bounds)
void setRotationPosition(const Matrix &transform)
void setAbsoluteRotationPosition(const Matrix &transform)
void setParentAbsoluteTransform(const Matrix &parentTransform)
void addLocalTransform(const Matrix &applyTransform)
void addQuaternion(const Quaternion &applyQuaternion)
void addRotation(float yaw, float pitch, float roll)
Vector3 getPosition() const
Quaternion getRotation() const
const Vector3 &getScale() const
const Matrix &getLocalTransform() const
Matrix getRotationPosition() const
Matrix getParentAbsoluteTransform() const
int getPassDowns() const
BoundingBox getWorldSpaceBounds()
Matrix getAbsoluteTransform()
Vector3 getAbsolutePosition()
void setAbsolutePosition(const Vector3 &position)
Quaternion getAbsoluteRotation()
Vector3 getAbsoluteScale()
JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

void highlight()