Public Member Functions | Static Public Member Functions
btQuaternion Class Reference

The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. More...

#include <btQuaternion.h>

List of all members.

Public Member Functions

btScalar angle (const btQuaternion &q) const
 Return the ***half*** angle between this quaternion and the other.
btScalar angleShortestPath (const btQuaternion &q) const
 Return the angle between this quaternion and the other along the shortest path.
 btQuaternion ()
 No initialization constructor.
 btQuaternion (const btScalar &x, const btScalar &y, const btScalar &z, const btScalar &w)
 Constructor from scalars.
 btQuaternion (const btVector3 &axis, const btScalar &angle)
 Axis angle Constructor.
 btQuaternion (const btScalar &yaw, const btScalar &pitch, const btScalar &roll) __attribute__((deprecated))
 Constructor from Euler angles.
btScalar dot (const btQuaternion &q) const
 Return the dot product between this quaternion and another.
SIMD_FORCE_INLINE btQuaternion farthest (const btQuaternion &qd) const
btScalar getAngle () const
 Return the angle of rotation represented by this quaternion.
btScalar getAngleShortestPath () const
 Return the angle of rotation represented by this quaternion along the shortest path.
btVector3 getAxis () const
 Return the axis of the rotation represented by this quaternion.
SIMD_FORCE_INLINE const btScalargetW () const
btQuaternion inverse () const
 Return the inverse of this quaternion.
btScalar length () const
 Return the length of the quaternion.
btScalar length2 () const
 Return the length squared of the quaternion.
SIMD_FORCE_INLINE btQuaternion nearest (const btQuaternion &qd) const
btQuaternionnormalize ()
 Normalize the quaternion Such that x^2 + y^2 + z^2 +w^2 = 1.
btQuaternion normalized () const
 Return a normalized version of this quaternion.
SIMD_FORCE_INLINE btQuaternion operator* (const btScalar &s) const
 Return a scaled version of this quaternion.
btQuaternionoperator*= (const btScalar &s)
 Scale this quaternion.
btQuaternionoperator*= (const btQuaternion &q)
 Multiply this quaternion by q on the right.
SIMD_FORCE_INLINE btQuaternion operator+ (const btQuaternion &q2) const
 Return the sum of this quaternion and the other.
SIMD_FORCE_INLINE btQuaternionoperator+= (const btQuaternion &q)
 Add two quaternions.
SIMD_FORCE_INLINE btQuaternion operator- (const btQuaternion &q2) const
 Return the difference between this quaternion and the other.
SIMD_FORCE_INLINE btQuaternion operator- () const
 Return the negative of this quaternion This simply negates each element.
btQuaternionoperator-= (const btQuaternion &q)
 Subtract out a quaternion.
btQuaternion operator/ (const btScalar &s) const
 Return an inversely scaled versionof this quaternion.
btQuaternionoperator/= (const btScalar &s)
 Inversely scale this quaternion.
void setEuler (const btScalar &yaw, const btScalar &pitch, const btScalar &roll)
 Set the quaternion using Euler angles.
void setEulerZYX (const btScalar &yaw, const btScalar &pitch, const btScalar &roll) __attribute__((deprecated))
 Set the quaternion using euler angles.
void setRotation (const btVector3 &axis, const btScalar &angle)
 Set the rotation using axis angle notation.
void setRPY (const btScalar &roll, const btScalar &pitch, const btScalar &yaw)
 Set the quaternion using fixed axis RPY.
btQuaternion slerp (const btQuaternion &q, const btScalar &t) const
 Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion.

Static Public Member Functions

static const btQuaterniongetIdentity ()

Detailed Description

The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform.

Definition at line 25 of file btQuaternion.h.


Constructor & Destructor Documentation

No initialization constructor.

Definition at line 28 of file btQuaternion.h.

btQuaternion::btQuaternion ( const btScalar x,
const btScalar y,
const btScalar z,
const btScalar w 
) [inline]

Constructor from scalars.

Definition at line 33 of file btQuaternion.h.

btQuaternion::btQuaternion ( const btVector3 &  axis,
const btScalar angle 
) [inline]

Axis angle Constructor.

Parameters:
axisThe axis which the rotation is around
angleThe magnitude of the rotation around the angle (Radians)

Definition at line 39 of file btQuaternion.h.

btQuaternion::btQuaternion ( const btScalar yaw,
const btScalar pitch,
const btScalar roll 
) [inline]

Constructor from Euler angles.

Parameters:
yawAngle around Y unless BT_EULER_DEFAULT_ZYX defined then Z
pitchAngle around X unless BT_EULER_DEFAULT_ZYX defined then Y
rollAngle around Z unless BT_EULER_DEFAULT_ZYX defined then X

Definition at line 47 of file btQuaternion.h.


Member Function Documentation

btScalar btQuaternion::angle ( const btQuaternion q) const [inline]

Return the ***half*** angle between this quaternion and the other.

Parameters:
qThe other quaternion

Definition at line 207 of file btQuaternion.h.

btScalar btQuaternion::angleShortestPath ( const btQuaternion q) const [inline]

Return the angle between this quaternion and the other along the shortest path.

Parameters:
qThe other quaternion

Definition at line 215 of file btQuaternion.h.

btScalar btQuaternion::dot ( const btQuaternion q) const [inline]

Return the dot product between this quaternion and another.

Parameters:
qThe other quaternion

Definition at line 151 of file btQuaternion.h.

Todo:
document this and it's use

Definition at line 285 of file btQuaternion.h.

btScalar btQuaternion::getAngle ( ) const [inline]

Return the angle of rotation represented by this quaternion.

Definition at line 225 of file btQuaternion.h.

Return the angle of rotation represented by this quaternion along the shortest path.

Definition at line 232 of file btQuaternion.h.

btVector3 btQuaternion::getAxis ( ) const [inline]

Return the axis of the rotation represented by this quaternion.

Definition at line 244 of file btQuaternion.h.

static const btQuaternion& btQuaternion::getIdentity ( ) [inline, static]

Definition at line 337 of file btQuaternion.h.

SIMD_FORCE_INLINE const btScalar& btQuaternion::getW ( ) const [inline]

Definition at line 343 of file btQuaternion.h.

btQuaternion btQuaternion::inverse ( ) const [inline]

Return the inverse of this quaternion.

Definition at line 254 of file btQuaternion.h.

btScalar btQuaternion::length ( ) const [inline]

Return the length of the quaternion.

Definition at line 163 of file btQuaternion.h.

btScalar btQuaternion::length2 ( ) const [inline]

Return the length squared of the quaternion.

Definition at line 157 of file btQuaternion.h.

Todo:
document this and it's use

Definition at line 296 of file btQuaternion.h.

Normalize the quaternion Such that x^2 + y^2 + z^2 +w^2 = 1.

Definition at line 170 of file btQuaternion.h.

Return a normalized version of this quaternion.

Definition at line 201 of file btQuaternion.h.

SIMD_FORCE_INLINE btQuaternion btQuaternion::operator* ( const btScalar s) const [inline]

Return a scaled version of this quaternion.

Parameters:
sThe scale factor

Definition at line 178 of file btQuaternion.h.

btQuaternion& btQuaternion::operator*= ( const btScalar s) [inline]

Scale this quaternion.

Parameters:
sThe scalar to scale by

Definition at line 132 of file btQuaternion.h.

btQuaternion& btQuaternion::operator*= ( const btQuaternion q) [inline]

Multiply this quaternion by q on the right.

Parameters:
qThe other quaternion Equivilant to this = this * q

Definition at line 141 of file btQuaternion.h.

SIMD_FORCE_INLINE btQuaternion btQuaternion::operator+ ( const btQuaternion q2) const [inline]

Return the sum of this quaternion and the other.

Parameters:
q2The other quaternion

Definition at line 262 of file btQuaternion.h.

SIMD_FORCE_INLINE btQuaternion& btQuaternion::operator+= ( const btQuaternion q) [inline]

Add two quaternions.

Parameters:
qThe quaternion to add to this one

Definition at line 116 of file btQuaternion.h.

SIMD_FORCE_INLINE btQuaternion btQuaternion::operator- ( const btQuaternion q2) const [inline]

Return the difference between this quaternion and the other.

Parameters:
q2The other quaternion

Definition at line 271 of file btQuaternion.h.

SIMD_FORCE_INLINE btQuaternion btQuaternion::operator- ( ) const [inline]

Return the negative of this quaternion This simply negates each element.

Definition at line 279 of file btQuaternion.h.

btQuaternion& btQuaternion::operator-= ( const btQuaternion q) [inline]

Subtract out a quaternion.

Parameters:
qThe quaternion to subtract from this one

Definition at line 124 of file btQuaternion.h.

btQuaternion btQuaternion::operator/ ( const btScalar s) const [inline]

Return an inversely scaled versionof this quaternion.

Parameters:
sThe inverse scale factor

Definition at line 186 of file btQuaternion.h.

btQuaternion& btQuaternion::operator/= ( const btScalar s) [inline]

Inversely scale this quaternion.

Parameters:
sThe scale factor

Definition at line 194 of file btQuaternion.h.

void btQuaternion::setEuler ( const btScalar yaw,
const btScalar pitch,
const btScalar roll 
) [inline]

Set the quaternion using Euler angles.

Parameters:
yawAngle around Y
pitchAngle around X
rollAngle around Z

Definition at line 70 of file btQuaternion.h.

void btQuaternion::setEulerZYX ( const btScalar yaw,
const btScalar pitch,
const btScalar roll 
) [inline]

Set the quaternion using euler angles.

Parameters:
yawAngle around Z
pitchAngle around Y
rollAngle around X

Definition at line 110 of file btQuaternion.h.

void btQuaternion::setRotation ( const btVector3 &  axis,
const btScalar angle 
) [inline]

Set the rotation using axis angle notation.

Parameters:
axisThe axis around which to rotate
angleThe magnitude of the rotation in Radians

Definition at line 58 of file btQuaternion.h.

void btQuaternion::setRPY ( const btScalar roll,
const btScalar pitch,
const btScalar yaw 
) [inline]

Set the quaternion using fixed axis RPY.

Parameters:
rollAngle around X
pitchAngle around Y
yawAngle around Z

Definition at line 90 of file btQuaternion.h.

btQuaternion btQuaternion::slerp ( const btQuaternion q,
const btScalar t 
) const [inline]

Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion.

Parameters:
qThe other quaternion to interpolate with
tThe ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q. Slerp interpolates assuming constant velocity.

Definition at line 311 of file btQuaternion.h.


The documentation for this class was generated from the following file:


tf2
Author(s): Tully Foote, Eitan Marder-Eppstein, Wim Meeussen
autogenerated on Mon Oct 6 2014 00:12:43