OpenBarnyard
 
Loading...
Searching...
No Matches
TTransformObject.h
Go to the documentation of this file.
1#pragma once
2#include "Math/TMatrix44.h"
3#include "Math/TQuaternion.h"
4#include "Math/TVector3.h"
5
7
9{
10public:
11 enum class Mode
12 {
13 Quat = 0,
16 };
17
18public:
21
22 void Push();
23 void Pop();
24
26 void GetLocalMatrixImp( TMatrix44& a_rOutMatrix );
27
28 void SetEuler( const TVector3& a_rEuler );
29 void SetEulerOrder( TUINT8 a_uiX, TUINT8 a_uiy, TUINT8 a_uiz );
30 void SetTranslate( const TVector3& a_rRranslation );
31 void SetQuat( const TQuaternion& a_rQuaternion );
32 void SetMatrix( const TMatrix44& a_rMatrix );
33
35 {
36 m_bChanged = TFALSE;
37 }
38
40 {
41 return m_bChanged;
42 }
43
44 Mode GetMode() const
45 {
46 return m_eMode;
47 }
48
49 const TVector3& GetScale() const
50 {
51 return m_Scale;
52 }
53
54private:
55 void RotateX( TFLOAT a_fAngle )
56 {
58 m_Matrix.RotateX( a_fAngle );
59 }
60
61 void RotateY( TFLOAT a_fAngle )
62 {
64 m_Matrix.RotateY( a_fAngle );
65 }
66
67 void RotateZ( TFLOAT a_fAngle )
68 {
70 m_Matrix.RotateZ( a_fAngle );
71 }
72
73private:
74 union
75 {
79 };
80
81 Mode m_eMode;
82 TVector3 m_Translation;
83 TVector3 m_Scale;
84 TUINT8 m_EulerOrder[ 3 ];
85 TBOOL m_bChanged;
86};
87
4x4 matrix implementation for the Toshi engine
Quaternion implementation for the Toshi engine.
3D vector implementation for the Toshi engine
#define TASSERT(X,...)
Definition Defines.h:138
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
uint8_t TUINT8
Definition Typedefs.h:17
float TFLOAT
Definition Typedefs.h:4
#define TFALSE
Definition Typedefs.h:24
bool TBOOL
Definition Typedefs.h:6
void RotateX(TFLOAT a_fAngle)
void SetEulerOrder(TUINT8 a_uiX, TUINT8 a_uiy, TUINT8 a_uiz)
void SetEuler(const TVector3 &a_rEuler)
TBOOL HasChanged() const
TVector3 & GetTranslation()
Mode GetMode() const
void SetTranslate(const TVector3 &a_rRranslation)
void GetLocalMatrixImp(TMatrix44 &a_rOutMatrix)
void SetQuat(const TQuaternion &a_rQuaternion)
const TVector3 & GetScale() const
void SetMatrix(const TMatrix44 &a_rMatrix)