Skip to content

Transform

Noah Gallo edited this page Mar 12, 2023 · 3 revisions

Transform

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.

Upon creation, a transforms position and rotation are set to the zero vector, and scale is set to the one vector

Public Fields/Properties

Name Property? Type Description
Position YES vec3 The position of the transform in world space
Rotation YES vec3 The Euler rotation of the transform
Scale YES vec3 The Scale of the transform

Public Methods

Signature Return Type Description
Forward() vec3 Returns the transforms normalized forward vector
Model() mat4 Returns the transforms model matrix

Clone this wiki locally