Go to the documentation of this file.
21 T s = sin(angle * 0.5) / d;
22 this->
m_x = axis[0] * s;
23 this->
m_y = axis[1] * s;
24 this->
m_z = axis[2] * s;
25 this->
m_w = cos(angle * T(0.5));
45 return QuaternionD(-(this->
m_x), -(this->
m_y), -(this->
m_y), this->m_t);
57 return QuaternionD(this->
m_w * q[0] + this->
m_x * q[3] + this->
m_y * q[2] - this->
m_z * q[1],
58 this->
m_w * q[1] + this->
m_y * q[3] + this->
m_z * q[0] - this->
m_x * q[2],
59 this->
m_w * q[2] + this->
m_z * q[3] + this->
m_x * q[1] - this->
m_y * q[0],
60 this->
m_w * q[3] - this->
m_x * q[0] - this->
m_y * q[1] - this->
m_z * q[2]);
65 T x = this->
m_w * q[0] + this->
m_x * q[3] + this->
m_y * q[2] - this->
m_z * q[1],
66 y = this->
m_w * q[0] + this->
m_x * q[3] + this->
m_y * q[2] - this->
m_z * q[1],
67 z = this->
m_w * q[0] + this->
m_x * q[3] + this->
m_y * q[2] - this->
m_z * q[1],
68 w = this->
m_w * q[0] + this->
m_x * q[3] + this->
m_y * q[2] - this->
m_z * q[1];
QuaternionT< T > & operator*=(const QuaternionT< T > &q)
Definition: QuaternionT.h:63
T m_z
Definition: SmallVector4T.h:22
T norm() const
Definition: SmallVector3T.h:290
T m_y
Definition: SmallVector4T.h:22
Template to handle 3 dimensional vector.
Definition: SmallVector4T.h:19
virtual ~QuaternionT(void)
Definition: QuaternionT.h:78
void ConjugateIt()
Definition: QuaternionT.h:48
T m_w
Definition: SmallVector4T.h:22
const QuaternionT< T > & operator=(const QuaternionT< T > &A)
Definition: QuaternionT.h:34
Definition: QuaternionT.h:10
T m_x
Definition: SmallVector4T.h:22
Definition: QuaternionT.h:6
Definition: SmallMatrix3x3T.h:14
QuaternionT< T > operator*(const QuaternionT< T > &q)
Definition: QuaternionT.h:55
QuaternionT< T > Conjugate() const
Definition: QuaternionT.h:43