47 #ifndef AI_MATRIX4X4_H_INC
48 #define AI_MATRIX4X4_H_INC
51 # pragma GCC system_header
59 template<
typename TReal>
class aiMatrix3x3t;
60 template<
typename TReal>
class aiQuaterniont;
72 template<
typename TReal>
77 aiMatrix4x4t() AI_NO_EXCEPT;
80 aiMatrix4x4t ( TReal _a1, TReal _a2, TReal _a3, TReal _a4,
81 TReal _b1, TReal _b2, TReal _b3, TReal _b4,
82 TReal _c1, TReal _c2, TReal _c3, TReal _c4,
83 TReal _d1, TReal _d2, TReal _d3, TReal _d4);
87 explicit aiMatrix4x4t( const aiMatrix3x3t<TReal>& m);
94 aiMatrix4x4t(const aiVector3t<TReal>& scaling, const aiQuaterniont<TReal>& rotation,
95 const aiVector3t<TReal>& position);
102 TReal* operator[] (
unsigned int p_iIndex);
107 const TReal* operator[] (
unsigned int p_iIndex) const;
110 bool operator== (const aiMatrix4x4t& m) const;
111 bool operator!= (const aiMatrix4x4t& m) const;
113 bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const;
116 aiMatrix4x4t& operator *= (const aiMatrix4x4t& m);
117 aiMatrix4x4t operator * (const aiMatrix4x4t& m) const;
118 aiMatrix4x4t operator * (const TReal& aFloat) const;
119 aiMatrix4x4t operator + (const aiMatrix4x4t& aMatrix) const;
121 template <typename TOther>
122 operator aiMatrix4x4t<TOther> () const;
126 aiMatrix4x4t& Transpose();
133 aiMatrix4x4t& Inverse();
134 TReal Determinant() const;
141 inline
bool IsIdentity() const;
150 void Decompose (aiVector3t<TReal>& scaling, aiQuaterniont<TReal>& rotation,
151 aiVector3t<TReal>& position) const;
161 void Decompose(aiVector3t<TReal>& pScaling, aiVector3t<TReal>& pRotation, aiVector3t<TReal>& pPosition) const;
172 void Decompose(aiVector3t<TReal>& pScaling, aiVector3t<TReal>& pRotationAxis, TReal& pRotationAngle, aiVector3t<TReal>& pPosition) const;
181 void DecomposeNoScaling (aiQuaterniont<TReal>& rotation,
182 aiVector3t<TReal>& position) const;
190 aiMatrix4x4t& FromEulerAnglesXYZ(TReal x, TReal y, TReal z);
191 aiMatrix4x4t& FromEulerAnglesXYZ(const aiVector3t<TReal>& blubb);
199 static aiMatrix4x4t& RotationX(TReal a, aiMatrix4x4t& out);
207 static aiMatrix4x4t& RotationY(TReal a, aiMatrix4x4t& out);
215 static aiMatrix4x4t& RotationZ(TReal a, aiMatrix4x4t& out);
224 static aiMatrix4x4t& Rotation(TReal a, const aiVector3t<TReal>& axis,
233 static aiMatrix4x4t& Translation( const aiVector3t<TReal>& v,
242 static aiMatrix4x4t& Scaling( const aiVector3t<TReal>& v, aiMatrix4x4t& out);
253 static aiMatrix4x4t& FromToMatrix(const aiVector3t<TReal>& from,
254 const aiVector3t<TReal>& to, aiMatrix4x4t& out);
256 TReal a1, a2, a3, a4;
257 TReal b1, b2, b3, b4;
258 TReal c1, c2, c3, c4;
259 TReal d1, d2, d3, d4;
267 ai_real a1, a2, a3, a4;
268 ai_real b1, b2, b3, b4;
269 ai_real c1, c2, c3, c4;
270 ai_real d1, d2, d3, d4;
274 #endif // __cplusplus
276 #endif // AI_MATRIX4X4_H_INC