Public Methods |
|
| Quaternion () |
| | Default quaternion, a null rotation.
|
|
| Quaternion (const qglviewer::Vec &axis, const float angle) |
| | Simple constructor with any axis and angle (in radians).
|
|
| Quaternion (const qglviewer::Vec &v, const float sin_ha, const float cos_ha) |
| | Constructor with normalized axis, cos & sin of half angle.
|
|
| Quaternion (const float q0, const float q1, const float q2, const float q3) |
| | Constructor from the values of a quaternion.
|
|
| Quaternion (const qglviewer::Vec &from, const qglviewer::Vec &to) |
| | Constructs a quaternion that will rotate from the from direction to the to direction.
|
|
Quaternion & | operator= (const Quaternion &Q) |
| | Equal operator.
|
|
| Quaternion (const Quaternion &Q) |
| | Copy constructor.
|
| QDomElement | domElement (const QString &name, QDomDocument &doc) const |
| void | initFromDOMElement (const QDomElement &de) |
|
void | setAxisAngle (const qglviewer::Vec &v, const float angle) |
| | To reset a quaternion to the rotation of axis v and angle angle (in radians).
|
|
void | setValue (const float q0, const float q1, const float q2, const float q3) |
| | Set the current quaternion value.
|
| void | getAxisAngle (qglviewer::Vec &axis, float &angle) const |
| qglviewer::Vec | axis () const |
| float | angle () const |
|
float | operator[] (int i) const |
| | Bracket operator, with a constant return value.
|
|
float & | operator[] (int i) |
| | Bracket operator, returns an l-value.
|
|
Quaternion | inverse () |
| | Returns the inverse of the Quaternion. The quaternion is not modified. See invert().
|
|
void | invert () |
| | Inverse the Quaternion (same rotation angle, but opposite axis). See also inverse().
|
| const GLdouble * | matrix () const |
| void | getMatrix (GLdouble m[4][4]) const |
| void | getRotationMatrix (float m[3][3]) const |
| void | setFromRotationMatrix (const float m[3][3]) |
| void | setFromRotatedBase (const qglviewer::Vec &X, const qglviewer::Vec &Y, const qglviewer::Vec &Z) |
|
Quaternion & | operator *= (const Quaternion &q) |
| | Quaternion is composed with q.
|
|
float | normalize () |
| | Normalize the quaternion. Should not need to be called.
|
|
qglviewer::Vec | inverseRotate (const qglviewer::Vec &v) const |
| | Vec v is applied the inverse quaternion rotation (inverse of rotate()).
|
|
qglviewer::Vec | rotate (const qglviewer::Vec &v) const |
| | Vec v is applied the quaternion rotation (see also inverseRotate()).
|
Friends |
|
const Quaternion | operator * (const Quaternion &a, const Quaternion &b) |
| | Returns the composition of the two rotations. Mind the order !
|