class
TTransform
template<typename T>Contains information about 3D object's position, rotation and scale, and provides methods to manipulate it.
Public
Constructors
TTransform<T>
TTransform<T>
TTransform
TTransform
TTransform
TTransform
Methods
SetWorldPosition
Converts the provided world position to a space relative to the provided parent, and sets it as the current transform's position.
SetWorldRotation
Converts the provided world rotation to a space relative to the provided parent, and sets it as the current transform's rotation.
SetWorldScale
Converts the provided world scale to a space relative to the provided parent, and sets it as the current transform's scale.
GetMatrix
Builds the transform matrix from current translation, rotation and scale properties.
GetInvMatrix
Builds the inverse transform matrix from current translation, rotation and scale properties.
MakeLocal
Makes the current transform relative to the provided transform.
In another words, converts from a world coordinate system to one local to the provided transform.
MakeWorld
Makes the current transform absolute.
In another words, converts from a local coordinate system relative to the provided transform, to a world coordinate system.
LookAt
Orients the object so it is looking at the provided (world space) where is used for determining the location of the object's Y axis.
Move
Moves the object's position by the vector offset provided along world axes.
MoveRelative
Moves the object's position by the vector offset provided along it's own axes (relative to orientation).
GetForward
Gets the negative Z (forward) axis of the object.
Returns: Forward axis of the object.
GetRight
Gets the X (right) axis of the object.
Returns: Right axis of the object.
SetForward
Rotates the game object so it's forward axis faces the provided direction.
- forwardDir
- The forward direction to face.
Rotate
Rotate the object around an arbitrary axis.
Rotate
Rotate the object around an arbitrary axis using a Quaternion.
SetPosition
Sets the local position of the object.
SetRotation
Sets the local rotation of the object.
SetWorldPosition
Converts the provided world position to a space relative to the provided parent, and sets it as the current transform's position.
SetWorldRotation
Converts the provided world rotation to a space relative to the provided parent, and sets it as the current transform's rotation.
SetWorldScale
Converts the provided world scale to a space relative to the provided parent, and sets it as the current transform's scale.
GetMatrix
Builds the transform matrix from current translation, rotation and scale properties.
GetInvMatrix
Builds the inverse transform matrix from current translation, rotation and scale properties.
MakeLocal
Makes the current transform relative to the provided transform.
In another words, converts from a world coordinate system to one local to the provided transform.
MakeWorld
Makes the current transform absolute.
In another words, converts from a local coordinate system relative to the provided transform, to a world coordinate system.
LookAt
Orients the object so it is looking at the provided (world space) where is used for determining the location of the object's Y axis.
Move
Moves the object's position by the vector offset provided along world axes.
MoveRelative
Moves the object's position by the vector offset provided along it's own axes (relative to orientation).
GetForward
Gets the negative Z (forward) axis of the object.
Returns: Forward axis of the object.
GetUp
Gets the Y (up) axis of the object.
Returns: Up axis of the object.
GetRight
Gets the X (right) axis of the object.
Returns: Right axis of the object.
SetForward
Rotates the game object so it's forward axis faces the provided direction.
- forwardDir
- The forward direction to face.
Rotate
Rotate the object around an arbitrary axis.
Rotate
Rotate the object around an arbitrary axis using a Quaternion.
SetPosition
Sets the local position of the object.
SetRotation
Sets the local rotation of the object.
SetWorldPosition
Converts the provided world position to a space relative to the provided parent, and sets it as the current transform's position.
SetWorldRotation
Converts the provided world rotation to a space relative to the provided parent, and sets it as the current transform's rotation.
SetWorldScale
Converts the provided world scale to a space relative to the provided parent, and sets it as the current transform's scale.
GetMatrix
Builds the transform matrix from current translation, rotation and scale properties.
GetInvMatrix
Builds the inverse transform matrix from current translation, rotation and scale properties.
MakeLocal
Makes the current transform relative to the provided transform.
In another words, converts from a world coordinate system to one local to the provided transform.
MakeWorld
Makes the current transform absolute.
In another words, converts from a local coordinate system relative to the provided transform, to a world coordinate system.
LookAt
Orients the object so it is looking at the provided (world space) where is used for determining the location of the object's Y axis.
Move
Moves the object's position by the vector offset provided along world axes.
MoveRelative
Moves the object's position by the vector offset provided along it's own axes (relative to orientation).
GetForward
Gets the negative Z (forward) axis of the object.
Returns: Forward axis of the object.
GetUp
Gets the Y (up) axis of the object.
Returns: Up axis of the object.
GetRight
Gets the X (right) axis of the object.
Returns: Right axis of the object.
SetForward
Rotates the game object so it's forward axis faces the provided direction.
- forwardDir
- The forward direction to face.
Rotate
Rotate the object around an arbitrary axis.
Rotate
Rotate the object around an arbitrary axis using a Quaternion.