|
|
@@ -159,18 +159,21 @@ inline Quaternion look(const Vector3& dir, const Vector3& up = VECTOR3_YAXIS)
|
|
|
return quaternion(m);
|
|
|
}
|
|
|
|
|
|
+/// Returns the right axis of the rotation represented by @a q.
|
|
|
inline Vector3 right(const Quaternion& q)
|
|
|
{
|
|
|
const Matrix3x3 m = matrix3x3(q);
|
|
|
return m.x;
|
|
|
}
|
|
|
|
|
|
+/// Returns the up axis of the rotation represented by @a q.
|
|
|
inline Vector3 up(const Quaternion& q)
|
|
|
{
|
|
|
const Matrix3x3 m = matrix3x3(q);
|
|
|
return m.y;
|
|
|
}
|
|
|
|
|
|
+/// Returns the forward axis of the rotation represented by @a q.
|
|
|
inline Vector3 forward(const Quaternion& q)
|
|
|
{
|
|
|
const Matrix3x3 m = matrix3x3(q);
|