154 vector3<T> axis =
normalize(m_AngularVelocity);
159 m_Rotation =
rotate(m_Rotation, axis, angle);
160 m_Translation =
translate(m_Translation,
scale(m_Velocity, fTime));
162 m = m_Scaling * m_Rotation;
163 mWorld = m * m_Translation;
167 m_Velocity += fTime * m_Accelerate;
168 m_AngularVelocity += fTime * m_AngularAccelerate;
virtual void setWorldMatrix(const matrix4x4< T > &p)
vector3< T > angle(const matrix4x4< T > &m)
Definition: matrix4x4.hpp:408
T lenghtSq(const quaternion< T > &v)
Definition: quaternion.hpp:125
matrix4x4< T > rotate(const matrix4x4< T > &mat, const vector3< T > &v, const T angle)
Definition: matrix4x4.hpp:274
vector2< T > scale(const vector2< T > &v, const float s)
Definition: vector2.hpp:189
quaternion< T > normalize(const quaternion< T > &v)
Definition: quaternion.hpp:164
matrix4x4< T > translate(const matrix4x4< T > &mat, const vector3< T > &v)
Definition: matrix4x4.hpp:264
matrix4x4< T > matrix4x4_identity()
Definition: matrix4x4.hpp:262