Public Member Functions |
|
| LQuaterniond (const LVecBase4d ©) |
|
| LQuaterniond (double, double, double, double) |
|
| LQuaterniond (double, const LVecBase3d ©) |
| bool | almost_equal (const LQuaterniond &other) const |
| | Returns true if two quaternions are memberwise equal within a default tolerance based on the numeric type.
|
| bool | almost_equal (const LQuaterniond &other, double threshold) const |
| | Returns true if two quaternions are memberwise equal within a specified tolerance.
|
| bool | almost_same_direction (const LQuaterniond &other, double threshold) const |
| | Returns true if two quaternions represent the same rotation within a specified tolerance.
|
| double | angle_deg (const LQuaterniond &other) const |
| | Returns the angle between the orientation represented by this quaternion and the other one, expressed in degrees.
|
| double | angle_rad (const LQuaterniond &other) const |
| | Returns the angle between the orientation represented by this quaternion and the other one, expressed in radians.
|
| LQuaterniond | conjugate () const |
| | Returns the complex conjugate of this quat.
|
| bool | conjugate_from (const LQuaterniond &other) |
| | Computes the conjugate of the other quat, and stores the result in this quat.
|
| bool | conjugate_in_place () |
| | Sets this to be the conjugate of the current quat.
|
| void | extract_to_matrix (LMatrix3d &m) const |
| | Based on the quat lib from VRPN.
|
| void | extract_to_matrix (LMatrix4d &m) const |
| | Based on the quat lib from VRPN.
|
| double | get_angle () const |
| | This, along with get_axis(), returns the rotation represented by the quaternion as an angle about an arbitrary axis.
|
| double | get_angle_rad () const |
| | This, along with get_axis(), returns the rotation represented by the quaternion as an angle about an arbitrary axis.
|
| LVector3d | get_axis () const |
| | This, along with get_angle(), returns the rotation represented by the quaternion as an angle about an arbitrary axis.
|
| LVector3d | get_axis_normalized () const |
| | This, along with get_angle(), returns the rotation represented by the quaternion as an angle about an arbitrary axis.
|
| LVector3d | get_forward (CoordinateSystem cs=CS_default) const |
| | Returns the orientation represented by this quaternion, expressed as a forward vector.
|
| LVecBase3d | get_hpr (CoordinateSystem cs=CS_default) const |
| | Extracts the equivalent Euler angles from the unit quaternion.
|
|
double | get_i () const |
|
double | get_j () const |
|
double | get_k () const |
|
double | get_r () const |
| LVector3d | get_right (CoordinateSystem cs=CS_default) const |
| | Returns the orientation represented by this quaternion, expressed as a right vector.
|
| LVector3d | get_up (CoordinateSystem cs=CS_default) const |
| | Returns the orientation represented by this quaternion, expressed as an up vector.
|
| bool | invert_from (const LQuaterniond &other) |
| | Computes the inverse of the other quat, and stores the result in this quat.
|
| bool | invert_in_place () |
| | Inverts the current quat.
|
| bool | is_almost_identity (double tolerance) const |
| | Returns true if this quaternion represents the identity transformation within a given tolerance.
|
| bool | is_identity () const |
| | Returns true if this quaternion represents the identity transformation: no rotation.
|
| bool | is_same_direction (const LQuaterniond &other) const |
| | Returns true if two quaternions represent the same rotation within a default tolerance based on the numeric type.
|
| LQuaterniond | multiply (const LQuaterniond &rhs) const |
| | actual multiply call (non virtual)
|
| bool | normalize () |
| | Normalizes the vector in place.
|
|
LQuaterniond | operator* (const LQuaterniond &) const |
| LMatrix3d | operator* (const LMatrix3d &) |
| | Quat * Matrix = matrix.
|
| LMatrix4d | operator* (const LMatrix4d &) |
| | Quat * Matrix = matrix.
|
|
LQuaterniond | operator* (double scalar) const |
|
LQuaterniond & | operator*= (const LQuaterniond &) |
|
LQuaterniond | operator+ (const LQuaterniond &other) const |
|
LQuaterniond | operator- () const |
|
LQuaterniond | operator- (const LQuaterniond &other) const |
|
LQuaterniond | operator/ (double scalar) const |
|
void | output (ostream &) const |
| void | set_from_axis_angle (double angle_deg, const LVector3d &axis) |
| | angle_deg is the angle about the axis in degrees.
|
| void | set_from_axis_angle_rad (double angle_rad, const LVector3d &axis) |
| | angle_rad is the angle about the axis in radians.
|
| void | set_from_matrix (const LMatrix3d &m) |
| | Sets the quaternion according to the rotation represented by the matrix.
|
|
void | set_from_matrix (const LMatrix4d &m) |
| void | set_hpr (const LVecBase3d &hpr, CoordinateSystem cs=CS_default) |
| | Sets the quaternion as the unit quaternion that is equivalent to these Euler angles.
|
|
void | set_i (double i) |
|
void | set_j (double j) |
|
void | set_k (double k) |
|
void | set_r (double r) |
| LVecBase4d | xform (const LVecBase4d &v) const |
| | Transforms a 4-d vector by the indicated rotation.
|
| LVecBase3d | xform (const LVecBase3d &v) const |
| | Transforms a 3-d vector by the indicated rotation.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static const LQuaterniond & | ident_quat () |
| | Returns an identity quaternion.
|
|
static void | init_type () |
|
static LQuaterniond | pure_imaginary (const LVector3d &) |
This is the base quaternion class.
Definition at line 963 of file lquaternion.h.