MAGE  v0.171.0
Matthias Advanced Game Engine
mage::Transform Class Reference

#include <transform.hpp>

Public Member Functions

 Transform () noexcept
 
 Transform (const Transform &transform) noexcept
 
 Transform (Transform &&transform) noexcept=default
 
 ~Transform ()=default
 
Transformoperator= (const Transform &transform) noexcept
 
Transformoperator= (Transform &&transform) noexcept
 
void SetTranslationX (F32 x) noexcept
 
void SetTranslationY (F32 y) noexcept
 
void SetTranslationZ (F32 z) noexcept
 
void SetTranslation (F32 x, F32 y, F32 z) noexcept
 
void SetTranslation (F32x3 translation) noexcept
 
void XM_CALLCONV SetTranslation (FXMVECTOR translation) noexcept
 
void AddTranslationX (F32 x) noexcept
 
void AddTranslationY (F32 y) noexcept
 
void AddTranslationZ (F32 z) noexcept
 
void AddTranslation (F32 x, F32 y, F32 z) noexcept
 
void AddTranslation (const F32x3 &translation) noexcept
 
void XM_CALLCONV AddTranslation (FXMVECTOR translation) noexcept
 
F32 GetTranslationX () const noexcept
 
F32 GetTranslationY () const noexcept
 
F32 GetTranslationZ () const noexcept
 
const F32x3 GetTranslationView () const noexcept
 
const XMVECTOR XM_CALLCONV GetTranslation () const noexcept
 
const XMMATRIX XM_CALLCONV GetObjectToParentTranslationMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetParentToObjectTranslationMatrix () const noexcept
 
void SetRotationX (F32 x) noexcept
 
void SetRotationY (F32 y) noexcept
 
void SetRotationZ (F32 z) noexcept
 
void SetRotation (F32 x, F32 y, F32 z) noexcept
 
void SetRotation (const F32x3 &rotation) noexcept
 
void XM_CALLCONV SetRotation (FXMVECTOR rotation) noexcept
 
void XM_CALLCONV SetRotationAroundDirection (FXMVECTOR direction, F32 angle) noexcept
 
void AddRotationX (F32 x) noexcept
 
void AddRotationX (F32 x, F32 min_angle, F32 max_angle) noexcept
 
void AddRotationY (F32 y) noexcept
 
void AddRotationY (F32 y, F32 min_angle, F32 max_angle) noexcept
 
void AddRotationZ (F32 z) noexcept
 
void AddRotationZ (F32 z, F32 min_angle, F32 max_angle) noexcept
 
void AddRotation (F32 x, F32 y, F32 z) noexcept
 
void AddRotation (F32 x, F32 y, F32 z, F32 min_angle, F32 max_angle) noexcept
 
void AddRotation (const F32x3 &rotation) noexcept
 
void AddRotation (const F32x3 &rotation, F32 min_angle, F32 max_angle) noexcept
 
void XM_CALLCONV AddRotation (FXMVECTOR rotation) noexcept
 
void XM_CALLCONV AddRotation (FXMVECTOR rotation, FXMVECTOR min_angles, FXMVECTOR max_angles) noexcept
 
F32 GetRotationX () const noexcept
 
F32 GetRotationY () const noexcept
 
F32 GetRotationZ () const noexcept
 
const F32x3 GetRotationView () const noexcept
 
const XMVECTOR XM_CALLCONV GetRotation () const noexcept
 
const XMVECTOR XM_CALLCONV GetObjectToParentRotationQuaternion () const noexcept
 
const XMVECTOR XM_CALLCONV GetParentToObjectRotationQuaternion () const noexcept
 
const XMMATRIX XM_CALLCONV GetObjectToParentRotationMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetParentToObjectRotationMatrix () const noexcept
 
void SetScaleX (F32 x) noexcept
 
void SetScaleY (F32 y) noexcept
 
void SetScaleZ (F32 z) noexcept
 
void SetScale (F32 s) noexcept
 
void SetScale (F32 x, F32 y, F32 z) noexcept
 
void SetScale (F32x3 scale) noexcept
 
void XM_CALLCONV SetScale (FXMVECTOR scale) noexcept
 
void AddScaleX (F32 x) noexcept
 
void AddScaleY (F32 y) noexcept
 
void AddScaleZ (F32 z) noexcept
 
void AddScale (F32 s) noexcept
 
void AddScale (F32 x, F32 y, F32 z) noexcept
 
void AddScale (const F32x3 &scale) noexcept
 
void XM_CALLCONV AddScale (FXMVECTOR scale) noexcept
 
F32 GetScaleX () const noexcept
 
F32 GetScaleY () const noexcept
 
F32 GetScaleZ () const noexcept
 
const F32x3 GetScaleView () const noexcept
 
const XMVECTOR XM_CALLCONV GetScale () const noexcept
 
const XMMATRIX XM_CALLCONV GetObjectToParentScaleMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetParentToObjectScaleMatrix () const noexcept
 
const XMVECTOR XM_CALLCONV GetObjectOrigin () const noexcept
 
const XMVECTOR XM_CALLCONV GetObjectAxisX () const noexcept
 
const XMVECTOR XM_CALLCONV GetObjectAxisY () const noexcept
 
const XMVECTOR XM_CALLCONV GetObjectAxisZ () const noexcept
 
const XMVECTOR XM_CALLCONV GetParentOrigin () const noexcept
 
const XMVECTOR XM_CALLCONV GetParentAxisX () const noexcept
 
const XMVECTOR XM_CALLCONV GetParentAxisY () const noexcept
 
const XMVECTOR XM_CALLCONV GetParentAxisZ () const noexcept
 
const XMVECTOR XM_CALLCONV GetWorldOrigin () const noexcept
 
const XMVECTOR XM_CALLCONV GetWorldAxisX () const noexcept
 
const XMVECTOR XM_CALLCONV GetWorldAxisY () const noexcept
 
const XMVECTOR XM_CALLCONV GetWorldAxisZ () const noexcept
 
void SetLocalTransform (SETTransform3D transform) noexcept
 
const XMMATRIX XM_CALLCONV GetObjectToParentMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetParentToObjectMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetObjectToWorldMatrix () const noexcept
 
const XMMATRIX XM_CALLCONV GetWorldToObjectMatrix () const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToParent (FXMVECTOR vector) const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToParentPoint (FXMVECTOR point) const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToParentDirection (FXMVECTOR direction) const noexcept
 
const XMVECTOR XM_CALLCONV TransformParentToObject (FXMVECTOR vector) const noexcept
 
const XMVECTOR XM_CALLCONV TransformParentToObjectPoint (FXMVECTOR point) const noexcept
 
const XMVECTOR XM_CALLCONV TransformParentToObjectDirection (FXMVECTOR direction) const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToWorld (FXMVECTOR vector) const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToWorldPoint (FXMVECTOR point) const noexcept
 
const XMVECTOR XM_CALLCONV TransformObjectToWorldDirection (FXMVECTOR direction) const noexcept
 
const XMVECTOR XM_CALLCONV TransformWorldToObject (FXMVECTOR vector) const noexcept
 
const XMVECTOR XM_CALLCONV TransformWorldToObjectPoint (FXMVECTOR point) const noexcept
 
const XMVECTOR XM_CALLCONV TransformWorldToObjectDirection (FXMVECTOR direction) const noexcept
 
bool HasOwner () const noexcept
 
ProxyPtr< NodeGetOwner () noexcept
 
ProxyPtr< const NodeGetOwner () const noexcept
 
void SetDirty () const noexcept
 

Private Member Functions

void SetOwner (ProxyPtr< Node > owner) noexcept
 
void UpdateObjectToWorldMatrix () const noexcept
 
void UpdateWorldToObjectMatrix () const noexcept
 

Private Attributes

SETTransform3D m_transform
 
XMMATRIX m_object_to_world
 
XMMATRIX m_world_to_object
 
bool m_dirty_object_to_world
 
bool m_dirty_world_to_object
 
ProxyPtr< Nodem_owner
 

Friends

class TransformClient
 

Detailed Description

A class of transforms.

Constructor & Destructor Documentation

◆ Transform() [1/3]

mage::Transform::Transform ( )
noexcept

Constructs a transform.

◆ Transform() [2/3]

mage::Transform::Transform ( const Transform transform)
noexcept

Constructs a transform from the given transform.

Parameters
[in]transformA reference to the transform to copy.

◆ Transform() [3/3]

mage::Transform::Transform ( Transform &&  transform)
defaultnoexcept

Constructs a transform by moving the given transform.

Parameters
[in]transformA reference to the transform to move.

◆ ~Transform()

mage::Transform::~Transform ( )
default

Destructs this transform.

Member Function Documentation

◆ AddRotation() [1/6]

void mage::Transform::AddRotation ( F32  x,
F32  y,
F32  z 
)
noexcept

Adds the given rotation component to the rotation component of this transform.

Parameters
[in]xThe x-value of the rotation component to add.
[in]yThe y-value of the rotation component to add.
[in]zThe z-value of the rotation component to add.

◆ AddRotation() [2/6]

void mage::Transform::AddRotation ( F32  x,
F32  y,
F32  z,
F32  min_angle,
F32  max_angle 
)
noexcept

Adds the given rotation component to the rotation component of this transform.

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]xThe x-value of the rotation component to add.
[in]yThe y-value of the rotation component to add.
[in]zThe z-value of the rotation component to add.
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).

◆ AddRotation() [3/6]

void mage::Transform::AddRotation ( const F32x3 rotation)
noexcept

Adds the given rotation component to the rotation component of this transform.

Parameters
[in]rotationA reference to the rotation component to add.

◆ AddRotation() [4/6]

void mage::Transform::AddRotation ( const F32x3 rotation,
F32  min_angle,
F32  max_angle 
)
noexcept

Adds the given rotation component to the rotation component of this transform.

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]rotationA reference to the rotation component to add.
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).

◆ AddRotation() [5/6]

void XM_CALLCONV mage::Transform::AddRotation ( FXMVECTOR  rotation)
noexcept

Adds the given rotation component to the rotation component of this transform.

Parameters
[in]rotationThe rotation component to add.

◆ AddRotation() [6/6]

void XM_CALLCONV mage::Transform::AddRotation ( FXMVECTOR  rotation,
FXMVECTOR  min_angles,
FXMVECTOR  max_angles 
)
noexcept

Adds the given rotation component to the rotation component of this transform.

Precondition
min_angles lie in [-pi, pi].
max_angles lie in [-pi, pi].
min_angles is not greater than max_angles.
Parameters
[in]rotationThe rotation component to add.
[in]min_anglesThe minimum angles (in radians).
[in]max_anglesThe maximum angles (in radians).

◆ AddRotationX() [1/2]

void mage::Transform::AddRotationX ( F32  x)
noexcept

Adds the given x-value to the rotation component of this transform.

Parameters
[in]xThe x-value of the rotation component to add.

◆ AddRotationX() [2/2]

void mage::Transform::AddRotationX ( F32  x,
F32  min_angle,
F32  max_angle 
)
noexcept

Adds the given x-value to the rotation component of this transform.

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]xThe x-value of the rotation component to add.
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).

◆ AddRotationY() [1/2]

void mage::Transform::AddRotationY ( F32  y)
noexcept

Adds the given y-value to the rotation component of this transform.

Parameters
[in]yThe y-value of the rotation component to add.

◆ AddRotationY() [2/2]

void mage::Transform::AddRotationY ( F32  y,
F32  min_angle,
F32  max_angle 
)
noexcept

Adds the given y-value to the rotation component of this transform.

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]yThe y-value of the rotation component to add.
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).

◆ AddRotationZ() [1/2]

void mage::Transform::AddRotationZ ( F32  z)
noexcept

Adds the given z-value to the rotation component of this transform.

Parameters
[in]zThe z-value of the rotation component to add.

◆ AddRotationZ() [2/2]

void mage::Transform::AddRotationZ ( F32  z,
F32  min_angle,
F32  max_angle 
)
noexcept

Adds the given z-value to the rotation component of this transform.

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]zThe z-value of the rotation component to add.
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).

◆ AddScale() [1/4]

void mage::Transform::AddScale ( F32  s)
noexcept

Adds the given scale component to the scale component of this transform.

Parameters
[in]sThe scale component to add.

◆ AddScale() [2/4]

void mage::Transform::AddScale ( F32  x,
F32  y,
F32  z 
)
noexcept

Adds the given scale component to the scale component of this transform.

Parameters
[in]xThe x-value of the scale component to add.
[in]yThe y-value of the scale component to add.
[in]zThe z-value of the scale component to add.

◆ AddScale() [3/4]

void mage::Transform::AddScale ( const F32x3 scale)
noexcept

Adds the given scale component to the scale component of this transform.

Parameters
[in]scaleA reference to the scale component to add.

◆ AddScale() [4/4]

void XM_CALLCONV mage::Transform::AddScale ( FXMVECTOR  scale)
noexcept

Adds the given scale component to the scale component of this transform.

Parameters
[in]scaleThe scale component to add.

◆ AddScaleX()

void mage::Transform::AddScaleX ( F32  x)
noexcept

Adds the given x-value to the scale component of this transform.

Parameters
[in]xThe x-value of the scale component to add.

◆ AddScaleY()

void mage::Transform::AddScaleY ( F32  y)
noexcept

Adds the given y-value to the scale component of this transform.

Parameters
[in]yThe y-value of the scale component to add.

◆ AddScaleZ()

void mage::Transform::AddScaleZ ( F32  z)
noexcept

Adds the given z-value to the scale component of this transform.

Parameters
[in]zThe z-value of the scale component to add.

◆ AddTranslation() [1/3]

void mage::Transform::AddTranslation ( F32  x,
F32  y,
F32  z 
)
noexcept

Adds the given translation component to the translation component of this transform.

Parameters
[in]xThe x-value of the translation component to add.
[in]yThe y-value of the translation component to add.
[in]zThe z-value of the translation component to add.

◆ AddTranslation() [2/3]

void mage::Transform::AddTranslation ( const F32x3 translation)
noexcept

Adds the given translation component to the translation component of this transform.

Parameters
[in]translationA reference to the translation component to add.

◆ AddTranslation() [3/3]

void XM_CALLCONV mage::Transform::AddTranslation ( FXMVECTOR  translation)
noexcept

Adds the given translation component to the translation component of this transform.

Parameters
[in]translationThe translation component to add.

◆ AddTranslationX()

void mage::Transform::AddTranslationX ( F32  x)
noexcept

Adds the given x-value to the translation component of this transform.

Parameters
[in]xThe x-value of the translation component to add.

◆ AddTranslationY()

void mage::Transform::AddTranslationY ( F32  y)
noexcept

Adds the given y-value to the translation component of this transform.

Parameters
[in]yThe y-value of the translation component to add.

◆ AddTranslationZ()

void mage::Transform::AddTranslationZ ( F32  z)
noexcept

Adds the given z-value to the translation component of this transform.

Parameters
[in]zThe z-value of the translation component to add.

◆ GetObjectAxisX()

const XMVECTOR XM_CALLCONV mage::Transform::GetObjectAxisX ( ) const
noexcept

Returns the direction of the local x-axis of this transform expressed in object space coordinates.

Returns
The direction of the local x-axis of this transform expressed in object space coordinates.

◆ GetObjectAxisY()

const XMVECTOR XM_CALLCONV mage::Transform::GetObjectAxisY ( ) const
noexcept

Returns the direction of the local y-axis of this transform expressed in object space coordinates.

Returns
The direction of the local y-axis of this transform expressed in object space coordinates.

◆ GetObjectAxisZ()

const XMVECTOR XM_CALLCONV mage::Transform::GetObjectAxisZ ( ) const
noexcept

Returns the direction of the local z-axis of this transform expressed in object space coordinates.

Returns
The direction of the local z-axis of this transform expressed in object space coordinates.

◆ GetObjectOrigin()

const XMVECTOR XM_CALLCONV mage::Transform::GetObjectOrigin ( ) const
noexcept

Returns the position of the local origin of this transform expressed in object space coordinates.

Returns
The position of the local origin of this transform expressed in object space coordinates.

◆ GetObjectToParentMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetObjectToParentMatrix ( ) const
noexcept

Returns the object-to-parent matrix of this transform.

Returns
The object-to-parent matrix of this transform.

◆ GetObjectToParentRotationMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetObjectToParentRotationMatrix ( ) const
noexcept

Returns the object-to-parent rotation matrix of this transform.

Returns
The object-to-parent rotation matrix of this transform.

◆ GetObjectToParentRotationQuaternion()

const XMVECTOR XM_CALLCONV mage::Transform::GetObjectToParentRotationQuaternion ( ) const
noexcept

Returns the object-to-parent rotation quaternion of this transform.

Returns
The object-to-parent rotation quaternion of this transform.

◆ GetObjectToParentScaleMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetObjectToParentScaleMatrix ( ) const
noexcept

Returns the object-to-parent scale matrix of this transform.

Returns
The scale object-to-parent matrix of this transform.

◆ GetObjectToParentTranslationMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetObjectToParentTranslationMatrix ( ) const
noexcept

Returns the object-to-parent translation matrix of this transform.

Returns
The object-to-parent translation matrix of this transform.

◆ GetObjectToWorldMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetObjectToWorldMatrix ( ) const
noexcept

Returns the object-to-world matrix of this transform.

Returns
The object-to-world matrix of this transform.

◆ GetOwner() [1/2]

ProxyPtr< Node > mage::Transform::GetOwner ( )
noexcept

Returns the owner of this transform.

Returns
A pointer to the owner of this transform.

◆ GetOwner() [2/2]

ProxyPtr< const Node > mage::Transform::GetOwner ( ) const
noexcept

Returns the owner of this transform.

Returns
A pointer to the owner of this transform.

◆ GetParentAxisX()

const XMVECTOR XM_CALLCONV mage::Transform::GetParentAxisX ( ) const
noexcept

Returns the direction of the local x-axis of this transform expressed in parent space coordinates.

Returns
The direction of the local x-axis of this transform expressed in parent space coordinates.

◆ GetParentAxisY()

const XMVECTOR XM_CALLCONV mage::Transform::GetParentAxisY ( ) const
noexcept

Returns the direction of the local y-axis of this transform expressed in parent space coordinates.

Returns
The direction of the local y-axis of this transform expressed in parent space coordinates.

◆ GetParentAxisZ()

const XMVECTOR XM_CALLCONV mage::Transform::GetParentAxisZ ( ) const
noexcept

Returns the direction of the local z-axis of this transform expressed in parent space coordinates.

Returns
The direction of the local z-axis of this transform expressed in parent space coordinates.

◆ GetParentOrigin()

const XMVECTOR XM_CALLCONV mage::Transform::GetParentOrigin ( ) const
noexcept

Returns the position of the local origin of this transform expressed in parent space coordinates.

Returns
The position of the local origin of this transform expressed in parent space coordinates.

◆ GetParentToObjectMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetParentToObjectMatrix ( ) const
noexcept

Returns the parent-to-object matrix of this transform.

Returns
The parent-to-object matrix of this transform.

◆ GetParentToObjectRotationMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetParentToObjectRotationMatrix ( ) const
noexcept

Returns the parent-to-object rotation matrix of this transform.

Returns
The parent-to-object rotation matrix of this transform.

◆ GetParentToObjectRotationQuaternion()

const XMVECTOR XM_CALLCONV mage::Transform::GetParentToObjectRotationQuaternion ( ) const
noexcept

Returns the parent-to-object rotation quaternion of this transform.

Returns
The parent-to-object rotation quaternion of this transform.

◆ GetParentToObjectScaleMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetParentToObjectScaleMatrix ( ) const
noexcept

Returns the parent-to-object scale matrix of this transform.

Returns
The parent-to-object scale matrix of this transform.

◆ GetParentToObjectTranslationMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetParentToObjectTranslationMatrix ( ) const
noexcept

Returns the parent-to-object translation matrix of this transform.

Returns
The parent-to-object translation matrix of this transform.

◆ GetRotation()

const XMVECTOR XM_CALLCONV mage::Transform::GetRotation ( ) const
noexcept

Returns the rotation component of this transform.

Returns
The rotation component of this transform.

◆ GetRotationView()

const F32x3 mage::Transform::GetRotationView ( ) const
noexcept

Returns the rotation component of this transform.

Returns
The rotation component of this transform.

◆ GetRotationX()

F32 mage::Transform::GetRotationX ( ) const
noexcept

Returns the x-value of the rotation component of this transform.

Returns
The x-value of the rotation component of this transform.

◆ GetRotationY()

F32 mage::Transform::GetRotationY ( ) const
noexcept

Returns the y-value of the rotation component of this transform.

Returns
The y-value of the rotation component of this transform.

◆ GetRotationZ()

F32 mage::Transform::GetRotationZ ( ) const
noexcept

Returns the z-value of the rotation component of this transform.

Returns
The z-value of the rotation component of this transform.

◆ GetScale()

const XMVECTOR XM_CALLCONV mage::Transform::GetScale ( ) const
noexcept

Returns the scale component of this transform.

Returns
The scale component of this transform.

◆ GetScaleView()

const F32x3 mage::Transform::GetScaleView ( ) const
noexcept

Returns the scale component of this transform.

Returns
The scale component of this transform.

◆ GetScaleX()

F32 mage::Transform::GetScaleX ( ) const
noexcept

Returns the x-value of the scale component of this transform.

Returns
The x-value of the scale component of this transform.

◆ GetScaleY()

F32 mage::Transform::GetScaleY ( ) const
noexcept

Returns the y-value of the scale component of this transform.

Returns
The y-value of the scale component of this transform.

◆ GetScaleZ()

F32 mage::Transform::GetScaleZ ( ) const
noexcept

Returns the z-value of the scale component of this transform.

Returns
The z-value of the scale component of this transform.

◆ GetTranslation()

const XMVECTOR XM_CALLCONV mage::Transform::GetTranslation ( ) const
noexcept

Returns the translation component of this transform.

Returns
The translation component of this transform.

◆ GetTranslationView()

const F32x3 mage::Transform::GetTranslationView ( ) const
noexcept

Returns the translation component of this transform.

Returns
The translation component of this transform.

◆ GetTranslationX()

F32 mage::Transform::GetTranslationX ( ) const
noexcept

Returns the x-value of the translation component of this transform.

Returns
The x-value of the translation component of this transform.

◆ GetTranslationY()

F32 mage::Transform::GetTranslationY ( ) const
noexcept

Returns the y-value of the translation component of this transform.

Returns
The y-value of the translation component of this transform.

◆ GetTranslationZ()

F32 mage::Transform::GetTranslationZ ( ) const
noexcept

Returns the z-value of the translation component of this transform.

Returns
The z-value of the translation component of this transform.

◆ GetWorldAxisX()

const XMVECTOR XM_CALLCONV mage::Transform::GetWorldAxisX ( ) const
noexcept

Returns the direction of the local x-axis of this transform expressed in world space coordinates.

Returns
The direction of the local x-axis of this transform expressed in world space coordinates.

◆ GetWorldAxisY()

const XMVECTOR XM_CALLCONV mage::Transform::GetWorldAxisY ( ) const
noexcept

Returns the direction of the local y-axis of this transform expressed in world space coordinates.

Returns
The direction of the local y-axis of this transform expressed in world space coordinates.

◆ GetWorldAxisZ()

const XMVECTOR XM_CALLCONV mage::Transform::GetWorldAxisZ ( ) const
noexcept

Returns the direction of the local z-axis of this transform expressed in world space coordinates.

Returns
The direction of the local z-axis of this transform expressed in world space coordinates.

◆ GetWorldOrigin()

const XMVECTOR XM_CALLCONV mage::Transform::GetWorldOrigin ( ) const
noexcept

Returns the position of the local origin of this transform expressed in world space coordinates.

Returns
The position of the local origin of this transform expressed in world space coordinates.

◆ GetWorldToObjectMatrix()

const XMMATRIX XM_CALLCONV mage::Transform::GetWorldToObjectMatrix ( ) const
noexcept

Returns the world-to-object matrix of this transform.

Returns
The world-to-object matrix of this transform.

◆ HasOwner()

bool mage::Transform::HasOwner ( ) const
noexcept

Checks whether this transform has an owner.

Returns
true if this transform has an owner. false otherwise.

◆ operator=() [1/2]

Transform& mage::Transform::operator= ( const Transform transform)
noexcept

Copies the given transform to this transform.

Parameters
[in]transformA reference to the transform to copy.
Returns
A reference to the copy of the given transform (i.e. this transform).

◆ operator=() [2/2]

Transform& mage::Transform::operator= ( Transform &&  transform)
noexcept

Moves the given transform to this transform.

Parameters
[in]transformA reference to the transform to move.
Returns
A reference to the copy of the given transform (i.e. this transform).

◆ SetDirty()

void mage::Transform::SetDirty ( ) const
noexcept

Sets this transform to dirty.

◆ SetLocalTransform()

void mage::Transform::SetLocalTransform ( SETTransform3D  transform)
noexcept

Sets the local transform of this transform to the given local transform.

Parameters
[in]transformThe local transform.

◆ SetOwner()

void mage::Transform::SetOwner ( ProxyPtr< Node owner)
privatenoexcept

Sets the owner of this transform to the given owner.

Parameters
[in]ownerA pointer to the owner.

◆ SetRotation() [1/3]

void mage::Transform::SetRotation ( F32  x,
F32  y,
F32  z 
)
noexcept

Sets the rotation component of this transform to the given rotation component.

Parameters
[in]xThe x-value of the rotation component.
[in]yThe y-value of the rotation component.
[in]zThe z-value of the rotation component.

◆ SetRotation() [2/3]

void mage::Transform::SetRotation ( const F32x3 rotation)
noexcept

Sets the rotation component of this transform to the given rotation component.

Parameters
[in]rotationA reference to the rotation component.

◆ SetRotation() [3/3]

void XM_CALLCONV mage::Transform::SetRotation ( FXMVECTOR  rotation)
noexcept

Sets the rotation component of this transform to the given rotation component.

Parameters
[in]rotationThe rotation component.

◆ SetRotationAroundDirection()

void XM_CALLCONV mage::Transform::SetRotationAroundDirection ( FXMVECTOR  direction,
F32  angle 
)
noexcept

Sets the rotation component of this transform to a rotation of the given angle around the given direction.

Parameters
[in]directionThe unit-length direction.
[in]angleThe angle.

◆ SetRotationX()

void mage::Transform::SetRotationX ( F32  x)
noexcept

Sets the x-value of the rotation component of this transform to the given value.

Parameters
[in]xThe x-value of the rotation component.

◆ SetRotationY()

void mage::Transform::SetRotationY ( F32  y)
noexcept

Sets the y-value of the rotation component of this transform to the given value.

Parameters
[in]yThe y-value of the rotation component.

◆ SetRotationZ()

void mage::Transform::SetRotationZ ( F32  z)
noexcept

Sets the z-value of the rotation component of this transform to the given value.

Parameters
[in]zThe z-value of the rotation component.

◆ SetScale() [1/4]

void mage::Transform::SetScale ( F32  s)
noexcept

Sets the scale component of this transform to the given scale component.

Parameters
[in]sThe scale component.

◆ SetScale() [2/4]

void mage::Transform::SetScale ( F32  x,
F32  y,
F32  z 
)
noexcept

Sets the scale component of this transform to the given scale component.

Parameters
[in]xThe x-value of the scale component.
[in]yThe y-value of the scale component.
[in]zThe z-value of the scale component.

◆ SetScale() [3/4]

void mage::Transform::SetScale ( F32x3  scale)
noexcept

Sets the scale component of this transform to the given scale component.

Parameters
[in]scaleThe scale component.

◆ SetScale() [4/4]

void XM_CALLCONV mage::Transform::SetScale ( FXMVECTOR  scale)
noexcept

Sets the scale component of this transform to the given scale component.

Parameters
[in]scaleThe scale component.

◆ SetScaleX()

void mage::Transform::SetScaleX ( F32  x)
noexcept

Sets the x-value of the scale component of this transform to the given value.

Parameters
[in]xThe x-value of the scale component.

◆ SetScaleY()

void mage::Transform::SetScaleY ( F32  y)
noexcept

Sets the y-value of the scale component of this transform to the given value.

Parameters
[in]yThe y-value of the scale component.

◆ SetScaleZ()

void mage::Transform::SetScaleZ ( F32  z)
noexcept

Sets the z-value of the scale component of this transform to the given value.

Parameters
[in]zThe z-value of the scale component.

◆ SetTranslation() [1/3]

void mage::Transform::SetTranslation ( F32  x,
F32  y,
F32  z 
)
noexcept

Sets the translation component of this transform to the given translation component.

Parameters
[in]xThe x-value of the translation component.
[in]yThe y-value of the translation component.
[in]zThe z-value of the translation component.

◆ SetTranslation() [2/3]

void mage::Transform::SetTranslation ( F32x3  translation)
noexcept

Sets the translation component of this transform to the given translation component.

Parameters
[in]translationThe translation component.

◆ SetTranslation() [3/3]

void XM_CALLCONV mage::Transform::SetTranslation ( FXMVECTOR  translation)
noexcept

Sets the translation component of this transform to the given translation component.

Parameters
[in]translationThe translation component.

◆ SetTranslationX()

void mage::Transform::SetTranslationX ( F32  x)
noexcept

Sets the x-value of the translation component of this transform to the given value.

Parameters
[in]xThe x-value of the translation component.

◆ SetTranslationY()

void mage::Transform::SetTranslationY ( F32  y)
noexcept

Sets the y-value of the translation component of this transform to the given value.

Parameters
[in]yThe y-value of the translation component.

◆ SetTranslationZ()

void mage::Transform::SetTranslationZ ( F32  z)
noexcept

Sets the z-value of the translation component of this transform to the given value.

Parameters
[in]zThe z-value of the translation component.

◆ TransformObjectToParent()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToParent ( FXMVECTOR  vector) const
noexcept

Transforms the given vector expressed in object space coordinates to parent space coordinates.

Parameters
[in]vectorThe vector expressed in object space coordinates.
Returns
The transformed vector expressed in parent space coordinates.

◆ TransformObjectToParentDirection()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToParentDirection ( FXMVECTOR  direction) const
noexcept

Transforms the given direction expressed in object space coordinates to parent space coordinates.

Parameters
[in]directionThe direction expressed in object space coordinates.
Returns
The transformed direction expressed in parent space coordinates.

◆ TransformObjectToParentPoint()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToParentPoint ( FXMVECTOR  point) const
noexcept

Transforms the given point expressed in object space coordinates to parent space coordinates.

Parameters
[in]pointThe point expressed in object space coordinates.
Returns
The transformed point expressed in parent space coordinates.

◆ TransformObjectToWorld()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToWorld ( FXMVECTOR  vector) const
noexcept

Transforms the given vector expressed in object space coordinates to world space coordinates.

Parameters
[in]vectorThe vector expressed in object space coordinates.
Returns
The transformed vector expressed in world space coordinates.

◆ TransformObjectToWorldDirection()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToWorldDirection ( FXMVECTOR  direction) const
noexcept

Transforms the given direction expressed in object space coordinates to world space coordinates.

Parameters
[in]directionThe direction expressed in object space coordinates.
Returns
The transformed direction expressed in world space coordinates.

◆ TransformObjectToWorldPoint()

const XMVECTOR XM_CALLCONV mage::Transform::TransformObjectToWorldPoint ( FXMVECTOR  point) const
noexcept

Transforms the given point expressed in object space coordinates to world space coordinates.

Parameters
[in]pointThe point expressed in object space coordinates.
Returns
The transformed point expressed in world space coordinates.

◆ TransformParentToObject()

const XMVECTOR XM_CALLCONV mage::Transform::TransformParentToObject ( FXMVECTOR  vector) const
noexcept

Transforms the given vector expressed in parent space coordinates to object space coordinates.

Parameters
[in]vectorThe vector expressed in parent space coordinates.
Returns
The transformed vector expressed in object space coordinates.

◆ TransformParentToObjectDirection()

const XMVECTOR XM_CALLCONV mage::Transform::TransformParentToObjectDirection ( FXMVECTOR  direction) const
noexcept

Transforms the given direction expressed in parent space coordinates to object space coordinates.

Parameters
[in]directionThe direction expressed in parent space coordinates.
Returns
The transformed direction expressed in object space coordinates.

◆ TransformParentToObjectPoint()

const XMVECTOR XM_CALLCONV mage::Transform::TransformParentToObjectPoint ( FXMVECTOR  point) const
noexcept

Transforms the given point expressed in parent space coordinates to object space coordinates.

Parameters
[in]pointThe point expressed in parent space coordinates.
Returns
The transformed point expressed in object space coordinates.

◆ TransformWorldToObject()

const XMVECTOR XM_CALLCONV mage::Transform::TransformWorldToObject ( FXMVECTOR  vector) const
noexcept

Transforms the given vector expressed in world space coordinates to object space coordinates.

Parameters
[in]vectorThe vector expressed in world space coordinates.
Returns
The transformed vector expressed in object space coordinates.

◆ TransformWorldToObjectDirection()

const XMVECTOR XM_CALLCONV mage::Transform::TransformWorldToObjectDirection ( FXMVECTOR  direction) const
noexcept

Transforms the direction vector expressed in world space coordinates to object space coordinates.

Parameters
[in]directionThe direction expressed in world space coordinates.
Returns
The transformed direction expressed in object space coordinates.

◆ TransformWorldToObjectPoint()

const XMVECTOR XM_CALLCONV mage::Transform::TransformWorldToObjectPoint ( FXMVECTOR  point) const
noexcept

Transforms the given point expressed in world space coordinates to object space coordinates.

Parameters
[in]pointThe point expressed in world space coordinates.
Returns
The transformed point expressed in object space coordinates.

◆ UpdateObjectToWorldMatrix()

void mage::Transform::UpdateObjectToWorldMatrix ( ) const
privatenoexcept

Updates the object-to-world matrix of this transform if dirty.

Precondition
This transform must have an owner.

◆ UpdateWorldToObjectMatrix()

void mage::Transform::UpdateWorldToObjectMatrix ( ) const
privatenoexcept

Updates the world-to-object matrix of this transform if dirty.

Precondition
This transform must have an owner.

Friends And Related Function Documentation

◆ TransformClient

friend class TransformClient
friend

Member Data Documentation

◆ m_dirty_object_to_world

bool mage::Transform::m_dirty_object_to_world
mutableprivate

A flag indicating whether the object-to-world matrix of this transform is dirty.

◆ m_dirty_world_to_object

bool mage::Transform::m_dirty_world_to_object
mutableprivate

A flag indicating whether the world-to-object matrix of this transform is dirty.

◆ m_object_to_world

XMMATRIX mage::Transform::m_object_to_world
mutableprivate

The cached object-to-world matrix of this transform.

◆ m_owner

ProxyPtr< Node > mage::Transform::m_owner
private

A pointer to the node owning this transform.

◆ m_transform

SETTransform3D mage::Transform::m_transform
private

The local transform of this transform.

◆ m_world_to_object

XMMATRIX mage::Transform::m_world_to_object
mutableprivate

The cached world-to-object matrix of this transform.