A class that implements a quaternion. More...
#include <xsquaternion.h>
Public Attributes | |
union { | |
struct { | |
XsReal m_w | |
Stores the w component of the quaternion. More... | |
XsReal m_x | |
Stores the x component of the quaternion. More... | |
XsReal m_y | |
Stores the y component of the quaternion. More... | |
XsReal m_z | |
Stores the z component of the quaternion. More... | |
} | |
XsReal m_data [4] | |
Stores the quaternion in an array of four elements. More... | |
}; | |
Related Functions | |
(Note that these are not member functions.) | |
int | XsQuaternion_compare (XsQuaternion const *thisPtr, XsQuaternion const *other, XsReal tolerance) |
Returns non-zero if the values at thisPtr and other are within tolerance of each other. More... | |
void | XsQuaternion_copy (XsQuaternion *copy, XsQuaternion const *src) |
Copies the contents of thisPtr into copy. More... | |
void | XsQuaternion_destruct (XsQuaternion *thisPtr) |
Sets the contents to 0, which is an invalid XsQuaternion. More... | |
XsReal | XsQuaternion_dotProduct (XsQuaternion const *thisPtr, XsQuaternion const *other) |
Returns the dot product of the thisPtr with other. More... | |
int | XsQuaternion_empty (const XsQuaternion *thisPtr) |
Test if this is a null object. More... | |
int | XsQuaternion_equal (XsQuaternion const *a, XsQuaternion const *b) |
returns non-zero if a and b are numerically equal More... | |
void | XsQuaternion_fromEulerAngles (XsQuaternion *thisPtr, const XsEuler *src) |
Create a quaternion representation from euler angles. More... | |
void | XsQuaternion_fromRotationMatrix (XsQuaternion *thisPtr, const XsMatrix *ori) |
Create a quaternion representation of orientation matrix ori. More... | |
const XsQuaternion * | XsQuaternion_identity (void) |
Returns an XsQuaternion that represents the identity quaternion. More... | |
void | XsQuaternion_inverse (const XsQuaternion *thisPtr, XsQuaternion *dest) |
Compute the inverse/conjugate of this quaternion. More... | |
void | XsQuaternion_invert (XsQuaternion *thisPtr) |
Invert this quaternion. More... | |
void | XsQuaternion_multiply (const XsQuaternion *left, const XsQuaternion *right, XsQuaternion *dest) |
Multiply left quaternion with right quaternion and put the result in dest. The parameters may point to the same XsQuaternion(s). More... | |
XsReal | XsQuaternion_normalize (XsQuaternion *thisPtr) |
Normalize this quaternion. More... | |
XsReal | XsQuaternion_normalized (const XsQuaternion *thisPtr, XsQuaternion *dest) |
Create a normalized version of this quaternion. More... | |
void | XsQuaternion_swap (XsQuaternion *a, XsQuaternion *b) |
Swap the contents of a and b. More... | |
A class that implements a quaternion.
Definition at line 102 of file xsquaternion.h.
XSCPPPROTECTED { ... } |
XsReal XsQuaternion::m_data[4] |
Stores the quaternion in an array of four elements.
Definition at line 114 of file xsquaternion.h.
XsReal XsQuaternion::m_w |
Stores the w component of the quaternion.
Definition at line 109 of file xsquaternion.h.
XsReal XsQuaternion::m_x |
Stores the x component of the quaternion.
Definition at line 110 of file xsquaternion.h.
XsReal XsQuaternion::m_y |
Stores the y component of the quaternion.
Definition at line 111 of file xsquaternion.h.
XsReal XsQuaternion::m_z |
Stores the z component of the quaternion.
Definition at line 112 of file xsquaternion.h.