#include <quaternion.h>
Public Member Functions | |
Constructors and Destructors | |
TQuaternion () throw () | |
Default constructor. | |
TQuaternion (const TQuaternion &q) throw () | |
Copy constructor. | |
TQuaternion (const TVector3< T > &axis, const T &new_angle) throw () | |
Detailed constructor. | |
TQuaternion (const T &x, const T &y, const T &z, const T &new_angle) throw () | |
Detailed constructor. | |
virtual | ~TQuaternion () throw () |
Destructor. | |
virtual void | clear () throw () |
Clear method. | |
Assignment | |
void | set (const TQuaternion &q) throw () |
void | set (const TVector3< T > &axis, const T &new_angle) throw () |
Assign the TQuaternion components. | |
void | set (const T &x, const T &y, const T &z, const T &new_angle) throw () |
Assign the TQuaternion components. | |
TQuaternion & | operator= (const TQuaternion &q) throw () |
Assign from another TQuaternion. | |
void | get (TQuaternion &q) const throw () |
Assign to another TQuaternion. | |
void | setIdentity () throw () |
Assign the components to the standard values. | |
void | swap (TQuaternion &q) throw () |
Swap the contents of two TQuaternion. | |
Accessors | |
T | getAngle () const throw () |
Get the positive angle rotation. | |
TVector3< T > | getAxis () throw (Exception::DivisionByZero) |
Get the normalized direction vector of the rotation axis. | |
TMatrix4x4< T > & | getRotationMatrix (TMatrix4x4< T > &m) const throw () |
Get the rotation matrix. | |
TQuaternion | operator- () const throw () |
Negative sign. | |
TQuaternion | getInverse () const throw () |
Get the inverse TQuaternion. | |
TQuaternion | getConjugate () const throw () |
Return the conjugate TQuaternion. | |
TQuaternion & | operator+= (const TQuaternion &q) throw () |
Add a TQuaternion to this TQuaternion. | |
TQuaternion & | operator-= (const TQuaternion &q) throw () |
Substract a TQuaternion from this TQuaternion. | |
Predicates | |
bool | operator== (const TQuaternion &q) const throw () |
Equality operator. | |
bool | operator!= (const TQuaternion &q) const throw () |
Inequality operator. | |
Debugging and Diagnostics | |
void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
Internal state dump. | |
Public Attributes | |
Attributes | |
T | i |
x component of the axis. | |
T | j |
y component of the axis. | |
T | k |
z component of the axis. | |
T | angle |
Angle component. |
Representing a rotation in three dimensional space.
|
Default constructor.
This method creates a new TQuaternion object. The axis-components are initialized to |
|
Copy constructor. Create a new TQuaternion object from another.
|
|
Detailed constructor. Create a new TQuaternion object from a variable of type TVector3 and an angle.
|
|
Detailed constructor. Create a new TQuaternion object from three values of type T and an angle.
|
|
Destructor. Destructs the TQuaternion object. As there are no dynamic data structures, nothing happens. |
|
Clear method. The values are set to 0. |
|
Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .
|
|
Assign to another TQuaternion. Assigns the components to another TQuaternion.
|
|
Get the positive angle rotation.
|
|
Get the normalized direction vector of the rotation axis.
|
|
Return the conjugate TQuaternion. (The axis components are negated.)
|
|
Get the inverse TQuaternion.
|
|
Get the rotation matrix.
|
|
Inequality operator.
|
|
Add a TQuaternion to this TQuaternion.
|
|
Negative sign.
|
|
Substract a TQuaternion from this TQuaternion.
|
|
Assign from another TQuaternion.
|
|
Equality operator.
|
|
Assign the TQuaternion components.
|
|
Assign the TQuaternion components.
|
|
Assign the components to the standard values.
The axis-components are set to |
|
Swap the contents of two TQuaternion.
|
|
Angle component.
|
|
x component of the axis.
|
|
y component of the axis.
|
|
z component of the axis.
|