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