rotate* helper functions

This commit is contained in:
Phillip Stephens 2016-02-02 00:29:16 -08:00
parent 8c801b26b8
commit a2d7c21a7e
1 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,11 @@ public:
return CQuaternion(cosf(angle/2), axis*sinf(angle/2));
}
void rotateX(float angle) { *this *= fromAxisAngle({1.0f, 0.0f, 0.0f}, angle); }
void rotateY(float angle) { *this *= fromAxisAngle({0.0f, 1.0f, 0.0f}, angle); }
void rotateZ(float angle) { *this *= fromAxisAngle({0.0f, 0.0f, 1.0f}, angle); }
CAxisAngle toAxisAngle();
static inline CVector3f rotate(const CQuaternion& rotation, const CVector3f& v)