Skip to content

Transform

Noah Gallo edited this page Feb 20, 2023 · 3 revisions

Every SceneObject has a transform which stores the object position, rotation, and scale in the scene. These items are then put together to create a model matrix which represents the object.

Class Transform

Fields

  • vec3 position
    • Use Accessors GetPosition() and SetPosition()
  • vec3 rotation
    • Use Accessors GetRotation() and SetRotation()
    • note: Rotation is currently stored as a 3D vector, however, for full rotational functionality, using a Quaternion based system should be considered
  • vec3 scale
    • Use Accessors GetScale() and SetScale()
    • scale affects the size of the object when rendered
  • mat4 model
    • Use Accessor GetModel(); model matrix cannot be edited directly;
    • This is the objects model matrix used for rendering

Methods

  • Accessor Methods...
  • ToString() - Returns a string representation of the transform for printing to the console

Clone this wiki locally