16 m_EulerOrder[ 0 ] = 2;
17 m_EulerOrder[ 1 ] = 1;
18 m_EulerOrder[ 2 ] = 0;
29 auto pPrevTransform = &pRender->GetTransforms().Top();
31 pRender->GetTransforms().PushNull();
32 auto pPushTransform = &pRender->GetTransforms().Top();
36 pPushTransform->PushQuaternion(
m_Quat, *pPrevTransform, m_Translation );
37 pPushTransform->Scale( m_Scale.x, m_Scale.y, m_Scale.z );
41 *pPushTransform = *pPrevTransform;
44 for (
TINT i = 0; i < 3; i++ )
46 switch ( m_EulerOrder[ i ] )
49 pPushTransform->RotateX(
m_Euler.x );
52 pPushTransform->RotateY(
m_Euler.y );
55 pPushTransform->RotateZ(
m_Euler.z );
60 pPushTransform->Scale( m_Scale.x, m_Scale.y, m_Scale.z );
65 pPushTransform->Multiply( *pPrevTransform,
m_Matrix );
68 pRender->GetCurrentContext()->SetModelViewMatrix( pRender->GetTransforms().Top() );
75 pRender->GetTransforms().Pop();
76 pRender->GetCurrentContext()->SetModelViewMatrix( pRender->GetTransforms().Top() );
90 outMatrix.
Scale( m_Scale.x, m_Scale.y, m_Scale.z );
97 for (
TINT i = 0; i < 3; i++ )
99 switch ( m_EulerOrder[ i ] )
113 outMatrix.
Scale( m_Scale.x, m_Scale.y, m_Scale.z );
130 m_EulerOrder[ 0 ] = x;
131 m_EulerOrder[ 1 ] = y;
132 m_EulerOrder[ 2 ] = z;
137 m_Translation = translation;
140 m_Matrix.SetTranslation( m_Translation );
Rendering system interface for the Toshi engine.
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
TVector3 & GetTranslation3()
static constexpr void TransformVector(TVector3 &a_rOutVector, const TMatrix44 &a_rMatrix, const TVector3 &a_rVector)
void RotateZ(TFLOAT a_fAngle)
void RotateX(TFLOAT a_fAngle)
constexpr void Scale(TFLOAT a_fScalar1, TFLOAT a_fScalar2, TFLOAT a_fScalar3)
constexpr void Identity()
void SetTranslation(const TVector4 &a_rTranslation)
void RotateY(TFLOAT a_fAngle)
TMatrix44 & SetFromQuaternion(const TQuaternion &a_rQuaternion)
void SetEulerOrder(TUINT8 a_uiX, TUINT8 a_uiy, TUINT8 a_uiz)
void SetEuler(const TVector3 &a_rEuler)
TVector3 & GetTranslation()
void SetTranslate(const TVector3 &a_rRranslation)
void GetLocalMatrixImp(TMatrix44 &a_rOutMatrix)
void SetQuat(const TQuaternion &a_rQuaternion)
void SetMatrix(const TMatrix44 &a_rMatrix)
static TFORCEINLINE TRenderInterface * GetSingleton()