QUATERNION Class Reference

#include <quat.h>

List of all members.

Public Member Functions

 QUATERNION ()
void LoadMultIdent ()
float Norm ()
void Normalize ()
void GetMat (float *destmat)
void GetMat (GLdouble *destmat)
void GetAxisAngle (float *aangle)
void Multiply (QUATERNION quat2)
void PostMultiply (QUATERNION quat2)
void SetAxisAngle (float a, float ax, float ay, float az)
void Rotate (float a, float ax, float ay, float az)
void SetEuler (float a, float b, float c)
QUATERNION ReturnConjugate ()
void LookAt (float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)
void SetMat (float *m1)
VERTEX RotateVec (VERTEX vec)
float GetAngleBetween (QUATERNION quat2)
VERTEX GetEuler ()
QUATERNION Slerp (QUATERNION quat2, float t)
QUATERNION QuatSlerp (QUATERNION quat2, float t)
QUATERNION Add (QUATERNION quat2)
QUATERNION MultScalar (float scalar)
void DebugPrint ()
VERTEX RelativeMove (VERTEX input)
QUATERNION operator * (const QUATERNION &quat2)

Public Attributes

float w
float x
float y
float z

Private Attributes

bool cachematvalid
float cachemat [16]


Detailed Description

Definition at line 98 of file quat.h.


Constructor & Destructor Documentation

QUATERNION::QUATERNION  ) 
 

Definition at line 12 of file quat.cpp.

References cachematvalid, and LoadMultIdent().


Member Function Documentation

QUATERNION QUATERNION::Add QUATERNION  quat2  ) 
 

Definition at line 559 of file quat.cpp.

References w, x, y, and z.

Referenced by Slerp().

void QUATERNION::DebugPrint  ) 
 

Definition at line 643 of file quat.cpp.

References w, x, y, and z.

float QUATERNION::GetAngleBetween QUATERNION  quat2  ) 
 

Definition at line 510 of file quat.cpp.

References VERTEX::dot(), RotateVec(), VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by Slerp().

void QUATERNION::GetAxisAngle float *  aangle  ) 
 

Definition at line 173 of file quat.cpp.

References DELTA, w, x, y, and z.

VERTEX QUATERNION::GetEuler  ) 
 

Definition at line 527 of file quat.cpp.

References w, VERTEX::x, x, VERTEX::y, y, VERTEX::z, and z.

void QUATERNION::GetMat GLdouble *  destmat  ) 
 

Definition at line 117 of file quat.cpp.

References cachemat, cachematvalid, Normalize(), w, x, y, and z.

void QUATERNION::GetMat float *  destmat  ) 
 

Definition at line 34 of file quat.cpp.

References cachemat, cachematvalid, Normalize(), w, x, y, and z.

Referenced by VAMOSWORLD::Draw(), VGUI::SpinningCar::Draw(), VAMOSWORLD::DrawCars(), BACKDROP::DrawSky(), CAMERA::PutTransformInto(), CAMERA::PutVelocityInto(), Vamos_World::World::reset(), and Vamos_Body::Gl_Car::transform_body().

void QUATERNION::LoadMultIdent  ) 
 

Definition at line 5 of file quat.cpp.

References cachematvalid, w, x, y, and z.

Referenced by CAMERA::CAMERA(), CAMERA::LoadVelocityIdentity(), OBJECTNODE::OBJECTNODE(), and QUATERNION().

void QUATERNION::LookAt float  eyeX,
float  eyeY,
float  eyeZ,
float  centerX,
float  centerY,
float  centerZ,
float  upX,
float  upY,
float  upZ
 

Definition at line 415 of file quat.cpp.

References SetMat().

void QUATERNION::Multiply QUATERNION  quat2  ) 
 

Definition at line 236 of file quat.cpp.

References cachematvalid, w, x, y, and z.

QUATERNION QUATERNION::MultScalar float  scalar  ) 
 

Definition at line 571 of file quat.cpp.

References w, x, y, and z.

Referenced by Slerp().

float QUATERNION::Norm  ) 
 

Definition at line 18 of file quat.cpp.

References w, x, y, and z.

Referenced by Normalize().

void QUATERNION::Normalize  ) 
 

Definition at line 23 of file quat.cpp.

References cachematvalid, Norm(), w, x, y, and z.

Referenced by GetMat().

QUATERNION QUATERNION::operator * const QUATERNION quat2  ) 
 

Definition at line 322 of file quat.cpp.

References w, x, y, and z.

void QUATERNION::PostMultiply QUATERNION  quat2  ) 
 

Definition at line 279 of file quat.cpp.

References cachematvalid, w, x, y, and z.

Referenced by CAMERA::PutTransformInto(), Rotate(), and CAMERA::Rotate().

QUATERNION QUATERNION::QuatSlerp QUATERNION  quat2,
float  t
 

Definition at line 583 of file quat.cpp.

References DELTA, w, x, y, and z.

VERTEX QUATERNION::RelativeMove VERTEX  input  ) 
 

Definition at line 843 of file quat.cpp.

References ReturnConjugate(), w, VERTEX::x, x, VERTEX::y, y, VERTEX::z, and z.

QUATERNION QUATERNION::ReturnConjugate  ) 
 

Definition at line 405 of file quat.cpp.

References w, x, y, and z.

Referenced by VAMOSWORLD::Draw(), VAMOSWORLD::DrawCars(), CAMERA::MoveRelative(), CAMERA::MoveRelativeConstrainY(), CAMERA::PutTransformInto(), RelativeMove(), RotateVec(), and Vamos_Body::Gl_Car::transform_body().

void QUATERNION::Rotate float  a,
float  ax,
float  ay,
float  az
 

Definition at line 634 of file quat.cpp.

References PostMultiply(), and SetAxisAngle().

Referenced by VAMOSWORLD::Draw(), VGUI::SpinningCar::Draw(), UTILITY::Draw2D(), VAMOSWORLD::DrawCars(), VAMOSWORLD::DrawHUD(), Vamos_World::World::reset(), and Vamos_Body::Gl_Car::transform_body().

VERTEX QUATERNION::RotateVec VERTEX  vec  ) 
 

Definition at line 482 of file quat.cpp.

References ReturnConjugate(), w, VERTEX::x, x, VERTEX::y, y, VERTEX::z, and z.

Referenced by VAMOSWORLD::Draw(), VAMOSWORLD::DrawCars(), BACKDROP::DrawClouds(), VAMOSWORLD::DrawHUD(), BACKDROP::DrawRain(), BACKDROP::DrawSkyGradient(), GetAngleBetween(), Vamos_World::World::interact(), VAMOSWORLD::ShadowTexCoord(), Vamos_Body::Gl_Car::transform_body(), and MOUSE::UpdateCamera().

void QUATERNION::SetAxisAngle float  a,
float  ax,
float  ay,
float  az
 

Definition at line 343 of file quat.cpp.

References cachematvalid, w, x, y, and z.

Referenced by BACKDROP::DrawClouds(), BACKDROP::DrawSky(), BACKDROP::DrawSkyGradient(), Vamos_World::World::interact(), Rotate(), CAMERA::Rotate(), Vamos_Body::Gl_Car::transform_body(), and MOUSE::UpdateCamera().

void QUATERNION::SetEuler float  a,
float  b,
float  c
 

Definition at line 389 of file quat.cpp.

References cachematvalid, w, x, y, and z.

Referenced by MOUSE::UpdateCamera().

void QUATERNION::SetMat float *  m1  ) 
 

Definition at line 436 of file quat.cpp.

References w, x, y, and z.

Referenced by LookAt().

QUATERNION QUATERNION::Slerp QUATERNION  quat2,
float  t
 

Definition at line 544 of file quat.cpp.

References Add(), GetAngleBetween(), and MultScalar().


Member Data Documentation

float QUATERNION::cachemat[16] [private]
 

Definition at line 102 of file quat.h.

Referenced by GetMat().

bool QUATERNION::cachematvalid [private]
 

Definition at line 101 of file quat.h.

Referenced by GetMat(), LoadMultIdent(), Multiply(), Normalize(), PostMultiply(), QUATERNION(), SetAxisAngle(), and SetEuler().

float QUATERNION::w
 

Definition at line 106 of file quat.h.

Referenced by Add(), DebugPrint(), GetAxisAngle(), GetEuler(), GetMat(), TRACK::Load(), LoadMultIdent(), CAMERA::MoveRelative(), CAMERA::MoveRelativeConstrainY(), Multiply(), MultScalar(), Norm(), Normalize(), operator *(), PostMultiply(), QuatSlerp(), RelativeMove(), ReturnConjugate(), RotateVec(), SetAxisAngle(), SetEuler(), and SetMat().

float QUATERNION::x
 

Definition at line 107 of file quat.h.

Referenced by Add(), DebugPrint(), GetAxisAngle(), GetEuler(), GetMat(), TRACK::Load(), LoadMultIdent(), CAMERA::MoveRelative(), CAMERA::MoveRelativeConstrainY(), Multiply(), MultScalar(), Norm(), Normalize(), operator *(), PostMultiply(), QuatSlerp(), RelativeMove(), Vamos_World::World::reset(), ReturnConjugate(), RotateVec(), SetAxisAngle(), SetEuler(), and SetMat().

float QUATERNION::y
 

Definition at line 108 of file quat.h.

Referenced by Add(), DebugPrint(), GetAxisAngle(), GetEuler(), GetMat(), TRACK::Load(), LoadMultIdent(), CAMERA::MoveRelative(), CAMERA::MoveRelativeConstrainY(), Multiply(), MultScalar(), Norm(), Normalize(), operator *(), PostMultiply(), QuatSlerp(), RelativeMove(), Vamos_World::World::reset(), ReturnConjugate(), RotateVec(), SetAxisAngle(), SetEuler(), and SetMat().

float QUATERNION::z
 

Definition at line 109 of file quat.h.

Referenced by Add(), DebugPrint(), GetAxisAngle(), GetEuler(), GetMat(), TRACK::Load(), LoadMultIdent(), CAMERA::MoveRelative(), CAMERA::MoveRelativeConstrainY(), Multiply(), MultScalar(), Norm(), Normalize(), operator *(), PostMultiply(), QuatSlerp(), RelativeMove(), Vamos_World::World::reset(), ReturnConjugate(), RotateVec(), SetAxisAngle(), SetEuler(), and SetMat().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:22 2006 by  doxygen 1.4.6