#include <Quaternion.h>
Inheritance diagram for OSCAR::Quaternion:

Public Methods | |
| Quaternion () | |
| Quaternion (double x, double y, double z, double w) | |
| Quaternion (const double *array) | |
| Quaternion (const Vector &rhs) | |
| Quaternion (const Quaternion &rhs) | |
| bool | GetConjugate (Quaternion &quat) const |
| void | Conjugate () |
| bool | Inverse (Quaternion &quat) const |
| Quaternion | Inverse () const |
| void | Invert () |
| double & | X () |
| const double & | X () const |
| double & | Y () |
| const double & | Y () const |
| double & | Z () |
| const double & | Z () const |
| double & | W () |
| const double & | W () const |
| bool | Get (Orientation &O) const |
| bool | Get (Rot3by3 &R) const |
| bool | Get (SpatialXform &S) const |
| bool | Get (Vector3 &axis, double &angle, AngleUnits angUnits=Radians) const |
| bool | Set (const Orientation &orient) |
| bool | Set (const Rot3by3 &R) |
| bool | Set (const SpatialXform &spatial) |
| bool | Set (const Vector3 &axis, double angle, AngleUnits angUnits=Radians) |
| bool | Normalize () |
| Quaternion & | operator *= (const Quaternion &rhs) |
| Quaternion | operator * (const Quaternion &rhs) const |
| Quaternion & | operator/= (const Quaternion &rhs) |
| Quaternion | operator/ (const Quaternion &rhs) const |
| Quaternion & | operator *= (const double rhs) |
| Quaternion | operator * (const double rhs) const |
| Quaternion & | operator/= (const double rhs) |
| Quaternion | operator/ (const double rhs) const |
Private Methods | |
| void | init (const double *array=0) |
|
|
Constructor. Construct an identity (0,0,0,1) Quaternion object. |
|
||||||||||||||||||||
|
Constructor. Constructs an Quaternion object with values for x, y, z, w.
|
|
|
Constructor. Constructs an Quaternion object with values initialized from first four elements of an array. If the array is smaller than four, behavior is undefined.
|
|
|
Copy Constructor. This is the Copy Constructor for an object of type Quaternion. Use this to construct an Quaternion object from an existing Vector object.
|
|
|
Copy Constructor. This is the Copy Constructor for an object of type Quaternion. Use this to construct an Quaternion object from an existing Quaternion object.
|
|
|
Conjugate of an Quaternion object. Conjugates an Quaternion object, where ~Q = [-X,-Y,-Z,W]
|
|
||||||||||||||||
|
Get an Equivalent Axis representation from an Quaternion object. This method is used to get an equivalent axis representation from an Quaternion object.
|
|
|
Get an SpatialXform representation from an Quaternion object. This method is used to get an equivalent SpatialXform object from an Quaternion object.
|
|
|
Get the 3 by 3 rotation matrix part from an Quaternion object. This method is used to get the 3 by 3 rotation matrix from an Quaternion object.
|
|
|
Get the elements representing the orientation of the source frame w.r.t the destination frame. This method is used to get the last three elements of a HandPose and the type of orientation.
|
|
|
Get the conjugate of an Quaternion object. This method is used to get the conjugate of an Quaternion object.
|
|
|
|
|
|
Get the inverse of an Quaternion object. This method is used to get inverse of an Quaternion object. (q*Inv(q))=(Inv(q)*q)=(0,0,0,1)
|
|
|
Get the inverse of an Quaternion object. This method is used to get inverse of an Quaternion object. (q*Inv(q))=(Inv(q)*q)=(0,0,0,1)
|
|
|
Invert an Quaternion object. Inversts an Quaternion object. (q*Inv(q))=(Inv(q)*q)=(0,0,0,1) |
|
|
Normalizes the quaternion. Divides the current quaternion by the sqrt of the sum of squares of each element
|
|
|
|
|
|
Overloaded binary operator* for quaternions. Performs quaternion multiplication, as defined at http://mathworld.wolfram.com/Quaternion.html Multiplication is not communative, i.e. q1*q2 != q2*q1
|
|
|
|
|
|
Overloaded operator for quaternions. Performs multiplication operation and assigns the result back to current object. No performance advantage over q1 = q1 * q2;
|
|
|
|
|
|
Overloaded binary operator/ for quaternions. Performs quaternion division, result = LHS * inverse(RHS)
|
|
|
|
|
|
Overloaded operator/= for quaternions. Divides the current quaternion by the argument and reassigns the result to current object. No performance advantage over q1 = q1 / q2
|
|
||||||||||||||||
|
Set an Quaternion object based on an equivalent axis representation. This method is used to set an Quaternion object based on an equivalent axis representation.
|
|
|
Set an Quaternion object based on an SpatialXform object. This method is used to set an Quaternion object based on the rotational elements of an SpatialXform.
|
|
|
Set the rotation matrix of an Quaternion object. This method is used to set the orientation part of the Quaternion object based on the rotation matrix passed as argument .
|
|
|
Set an Orientation representation to an Quaternion object. This method is used to set an equivalent 3x1 Orientation object to the Quaternion object.
|
|
|
Read W. Gives read access to W of a const Quaternion. Equivalent to at(3).
|
|
|
Read/write W. Gives read/write access to Z of a non-const Quaternion. Equivalent to at(3).
|
|
|
Read X. Gives read access to X of a const Quaternion. Equivalent to at(0).
|
|
|
Read/write X. Gives read/write access to X of a non-const Quaternion. Equivalent to at(0).
|
|
|
Read Y. Gives read access to Y of a const Quaternion. Equivalent to at(1).
|
|
|
Read/write Y. Gives read/write access to Y of a non-const Quaternion. Equivalent to at(1).
|
|
|
Read Z. Gives read access to Z of a const Quaternion. Equivalent to at(2).
|
|
|
Read/write Z. Gives read/write access to Z of a non-const Quaternion. Equivalent to at(2).
|
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |