AI_Quaternion Class Reference
[Mathematics]

#include <AI_Quaternion.h>

List of all members.


Detailed Description

AI_Quaternion class with some basic operators.

(C) 2004 RadonLabs GmbH

Public Member Functions

 AI_Quaternion ()
 AI_Quaternion (float _x, float _y, float _z, float _w)
 AI_Quaternion (const AI_Quaternion &q)
void set (float _x, float _y, float _z, float _w)
void set (const AI_Quaternion &q)
void ident (void)
void conjugate (void)
void scale (float s)
float norm (void)
float magnitude (void)
void invert (void)
void normalize (void)
bool operator== (const AI_Quaternion &q)
bool operator!= (const AI_Quaternion &q)
const AI_Quaternionoperator+= (const AI_Quaternion &q)
const AI_Quaternionoperator-= (const AI_Quaternion &q)
const AI_Quaternionoperator *= (const AI_Quaternion &q)
AI_Vector3 rotate (const AI_Vector3 &v)
 rotate vector by AI_Quaternion
void set_from_axes (const AI_Vector3 &from, const AI_Vector3 &to)
void set_from_axes2 (const AI_Vector3 &from, const AI_Vector3 &to)
void set_rotate_axis_angle (const AI_Vector3 &v, float a)
void set_rotate_x (float a)
void set_rotate_y (float a)
void set_rotate_z (float a)
void set_rotate_xyz (float ax, float ay, float az)
bool isequal (const AI_Quaternion &v, float tol) const
void slerp (const AI_Quaternion &q0, const AI_Quaternion &q1, float l)
void lerp (const AI_Quaternion &q0, const AI_Quaternion &q1, float l)

Public Attributes

float x
float y
float z
float w


Constructor & Destructor Documentation

AI_Quaternion::AI_Quaternion (  )  [inline]

AI_Quaternion::AI_Quaternion ( float  _x,
float  _y,
float  _z,
float  _w 
) [inline]

AI_Quaternion::AI_Quaternion ( const AI_Quaternion q  )  [inline]


Member Function Documentation

void AI_Quaternion::set ( float  _x,
float  _y,
float  _z,
float  _w 
) [inline]

void AI_Quaternion::set ( const AI_Quaternion q  )  [inline]

void AI_Quaternion::ident ( void   )  [inline]

void AI_Quaternion::conjugate ( void   )  [inline]

void AI_Quaternion::scale ( float  s  )  [inline]

float AI_Quaternion::norm ( void   )  [inline]

float AI_Quaternion::magnitude ( void   )  [inline]

void AI_Quaternion::invert ( void   )  [inline]

void AI_Quaternion::normalize ( void   )  [inline]

bool AI_Quaternion::operator== ( const AI_Quaternion q  )  [inline]

bool AI_Quaternion::operator!= ( const AI_Quaternion q  )  [inline]

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

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

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

AI_Vector3 AI_Quaternion::rotate ( const AI_Vector3 v  )  [inline]

rotate vector by AI_Quaternion

void AI_Quaternion::set_from_axes ( const AI_Vector3 from,
const AI_Vector3 to 
) [inline]

Create a rotation from one vector to an other. Works only with unit vectors.

See http://www.martinb.com/maths/algebra/vectors/angleBetween/index.htm for more information.

Parameters:
from source unit vector
to destination unit vector

void AI_Quaternion::set_from_axes2 ( const AI_Vector3 from,
const AI_Vector3 to 
) [inline]

Create a rotation from one vector to an other. Works with non unit vectors.

See http://www.martinb.com/maths/algebra/vectors/angleBetween/index.htm for more information.

Parameters:
from source vector
to destination vector

void AI_Quaternion::set_rotate_axis_angle ( const AI_Vector3 v,
float  a 
) [inline]

void AI_Quaternion::set_rotate_x ( float  a  )  [inline]

void AI_Quaternion::set_rotate_y ( float  a  )  [inline]

void AI_Quaternion::set_rotate_z ( float  a  )  [inline]

void AI_Quaternion::set_rotate_xyz ( float  ax,
float  ay,
float  az 
) [inline]

bool AI_Quaternion::isequal ( const AI_Quaternion v,
float  tol 
) const [inline]

void AI_Quaternion::slerp ( const AI_Quaternion q0,
const AI_Quaternion q1,
float  l 
) [inline]

void AI_Quaternion::lerp ( const AI_Quaternion q0,
const AI_Quaternion q1,
float  l 
) [inline]


Member Data Documentation


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