




ad::Quaternion Class ReferenceStores a 3D rotation, free of gimbal lock.
More...
#include <quaternion.h>
List of all members.

Public Member Functions 
 Quaternion () 
 Initialize with no rotation.

 Quaternion (const Quaternion &q) 
 Initialize with the rotation of another quaternion.

 Quaternion (float w, float x, float y, float z) 
 Initialize with w ,x ,y ,z .

 Quaternion (float rotX, float rotY, float rotZ) 
 Initialize from Euler rotations.

void  Set (float w, float x, float y, float z) 
 Set to w ,x ,y ,z .

Quaternion &  operator= (const Quaternion &q) 
 Assign to the value of another quaternion.

Quaternion &  operator *= (const Quaternion &q) 
 Rotate this quaternion by another.

Quaternion  operator * (const Quaternion &q) 
 Return the rotation of this quaternion then another, q .

Static Public Member Functions 
static Quaternion  Slerp (const Quaternion &from, const Quaternion &to, float t) 
 Smoothly interpolates between two UNIT quaternions.

static Quaternion  Lerp (const Quaternion &from, const Quaternion &to, float t) 
 Linearly interpolates between two UNIT quaternions.

Public Attributes 
float  w 
float  x 
float  y 
float  z 
Detailed Description
Stores a 3D rotation, free of gimbal lock.
Mathematical structure that you shouldn't even try to visualize. These are good for interpolating between two rotations and applying successive rotations.
Member Function Documentation

Linearly interpolates between two UNIT quaternions.
Generate a quaternion by linearly interpolating between the poses from and to .  Parameters:

 from  The source from quaternion 
 to  The source to quaternion 
 t  In the range of 0 to 1, this value specifies how much to interpolate from the from quaternion to the to quaternion. 


Smoothly interpolates between two UNIT quaternions.
Generate a quaternion by sphericallylinearly interpolating between the poses from and to .  Parameters:

 from  The source from quaternion 
 to  The source to quaternion 
 t  In the range of 0 to 1, this value specifies how much to interpolate from the from quaternion to the to quaternion. 

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

