13 cout <<
"Quaternion q1: 45deg. around y-axis: ";
17 cout << angleDEG <<
", " << axis << endl
20 cout <<
"Quaternion q1: 45deg. around y-axis: ";
23 cout << angleDEG <<
", " << axis << endl
26 cout <<
"Quaternion to matrix: 45deg. around y-axis: ";
29 cout << angleDEG <<
", " << axis << endl
32 cout <<
"Quaternion q2: 45 deg. around y-axis" << endl;
33 cout <<
"Quaternion q3 = q1 x q2: 90 deg. around y-axis: ";
37 cout << angleDEG <<
", " << axis << endl
41 for (
int i = 0; i < 9; ++i)
43 cout <<
"Quaternion q1.slerp(" << t <<
", q3): ";
45 cout << angleDEG <<
", " << axis << endl;
47 cout <<
"Quaternion q1.lerp (" << t <<
", q3): ";
49 cout << angleDEG <<
", " << axis << endl;
54 cout <<
"Quaternion q1: 45deg. around y-axis: " << endl;
55 cout <<
"Quaternion q2 = q1.inverted(): ";
59 cout << angleDEG <<
", " << axis << endl;
60 cout <<
"Quaternion q3 = q1 * q2: ";
63 cout << angleDEG <<
", " << axis << endl
66 cout <<
"Quaternion q1.fromEuler(0,45,0): " << endl;
67 q1.fromEuler(0, 45, 0);
69 cout << angleDEG <<
", " << axis << endl;
SLVec3< SLfloat > SLVec3f
void toAngleAxis(T &angleDEG, SLVec3< T > &axis) const
Conversion to axis and angle in radians.
SLQuat4< T > inverted() const
SLQuat4< T > rotated(const SLQuat4< T > &b) const
void fromAngleAxis(T angleRAD, T axisX, T axisY, T axisZ)
SLQuat4< T > slerp(const SLQuat4< T > &q2, T t) const
SLMat3< T > toMat3() const
SLQuat4< T > lerp(const SLQuat4< T > &q2, T t) const
Linear interpolation.
void fromMat3(const SLMat3< T > &m)
void toAngleAxis(T &angleDEG, SLVec3< T > &axis) const