00001
00002
00003
00004
00005
00006
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TA_MFRAME_H
00018 #define TA_MFRAME_H
00019
00020 #ifndef TA_MATRIX_H
00021 #include "Matrix.h"
00022 #endif // TA_MATRIX_H
00023
00024 TA_OBFUSCATION_SKIP_PASS_2
00025
00026 struct D3DXMATRIX;
00027
00028 namespace TA
00029 {
00030
00031 struct TACOMMON_CLASS MFrame
00032 {
00033 public:
00034 TA_OBFUSCATION_RESERVED_FULL_ON
00035
00036 Mat33 m33Rotation;
00037 Vec3 v3Translation;
00038 TA_OBFUSCATION_RESERVED_FULL_OFF
00039
00040 TA_OBFUSCATION_RESERVED_ON
00042
00043 MFrame();
00044
00045 MFrame(const MFrame& mFrame);
00046 MFrame(const Vec3& v3NewTranslation);
00047 MFrame(const Mat33& m33NewRotation);
00048 MFrame(
00049 const Vec3& v3NewTranslation,
00050 const Mat33& m33NewRotation);
00051
00052 void Clear();
00053
00054
00055 void Initialise(D3DXMATRIX* pD3DMatrix);
00056 void GetAsD3DMatrix(D3DXMATRIX* pD3DMatrix) const;
00058
00059
00060 void InitialiseFromOpenGlMatrix(const float* pfMatrix);
00061 void GetOpenGlMatrix(float* pfMatrix) const;
00063
00064 void Interpolate(MFrame& a, MFrame& b, float fT);
00065
00067
00068 MFrame& operator *= (const MFrame& mFrame);
00069 MFrame& operator *= (const Mat33& m33Value);
00070 MFrame& operator /= (const MFrame& mFrameB);
00072
00074
00075 MFrame operator * (const MFrame& mFrame) const;
00076 MFrame operator * (const Mat33& m33Value) const;
00077 MFrame operator / (const MFrame& mFrameB) const;
00079
00080 friend Vec3 operator * (const Vec3& v3A, const MFrame& mFrameB);
00081 friend Vec3 operator / (const Vec3& v3A, const MFrame& mFrameB);
00082 friend Vec3& operator *= (Vec3& v3A, const MFrame& m33B);
00083 friend Vec3& operator /= (Vec3& v3A, const MFrame& m33B);
00084
00086
00087 bool operator == (const MFrame& mFrame) const;
00088 bool operator != (const MFrame& mFrame) const;
00090
00091
00092 void Invert();
00093 static MFrame TAC_CALL GetInverse(const MFrame& mFrame);
00094 MFrame GetInverse() const;
00095
00096
00097 Vec3 GetTransform(const Vec3& v3Value);
00098 Vec3 GetInverseTransform(const Vec3& v3Value);
00099
00100 void Mirror(const Vec3& v3DirectionToMirror, const Vec3& v3PointToMirrorAbout);
00101 TA_OBFUSCATION_RESERVED_OFF
00102 };
00103
00104 TA_OBFUSCATION_RESERVED_FULL_ON
00105 const MFrame k_mFrameIdentity(k_v3Zero, k_m33Identity);
00106 TA_OBFUSCATION_RESERVED_FULL_OFF
00107
00108 }
00109
00110 #include "MFrame.inl"
00111
00112
00113 #endif // TA_MFRAME_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.