22 #ifndef TETRAEDGE_TE_TE_QUATERNION_H 23 #define TETRAEDGE_TE_TE_QUATERNION_H 25 #include "math/quat.h" 27 #include "tetraedge/te/te_vector3f32.h" 28 #include "tetraedge/te/te_matrix4x4.h" 35 TeQuaternion(
const Math::Quaternion &q) : Math::Quaternion(q) {};
36 TeQuaternion(
float a,
float b,
float c,
float d) : Math::Quaternion(a, b, c, d) {};
40 float f = sinf(angle * 0.5);
41 ret.x() = axis.x() * f;
42 ret.y() = axis.y() * f;
43 ret.z() = axis.z() * f;
44 ret.w() = cosf(angle * 0.5);
51 rot.x() = sinf(euler.x() / 2.0);
54 rot.w() = cosf(euler.x() / 2.0);
58 rot.y() = sinf(euler.y() / 2.0);
60 rot.w() = cosf(euler.y() / 2.0);
65 rot.z() = sinf(euler.z() / 2.0);
66 rot.w() = cosf(euler.z() / 2.0);
73 const float xdeg = (float)(euler.x() * M_PI / 180.0);
74 const float ydeg = (float)(euler.y() * M_PI / 180.0);
75 const float zdeg = (float)(euler.z() * M_PI / 180.0);
81 return retval.transpose();
103 #endif // TETRAEDGE_TE_TE_QUATERNION_H
Definition: detection.h:27
Definition: te_quaternion.h:32
Definition: te_matrix4x4.h:37
FORCEINLINE void writeFloatLE(float value)
Definition: stream.h:233
FORCEINLINE float readFloatLE()
Definition: stream.h:615
Definition: te_vector3f32.h:33