Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXQuatf Class Reference

#include <FXQuatf.h>

Inheritance diagram for FX::FXQuatf:
FX::FXVec4f

Public Member Functions

 FXQuatf ()
 
 FXQuatf (const FXQuatf &q)
 
 FXQuatf (FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww)
 
 FXQuatf (const FXfloat v[])
 
 FXQuatf (const FXVec3f &axis, FXfloat phi=0.0f)
 
 FXQuatf (FXfloat roll, FXfloat pitch, FXfloat yaw)
 
 FXQuatf (const FXVec3f &fr, const FXVec3f &to)
 
 FXQuatf (const FXVec3f &ex, const FXVec3f &ey, const FXVec3f &ez)
 
 FXQuatf (const FXMat3f &mat)
 
FXQuatfadjust ()
 
void setAxisAngle (const FXVec3f &axis, FXfloat phi=0.0f)
 
void getAxisAngle (FXVec3f &axis, FXfloat &phi) const
 
void setRollPitchYaw (FXfloat roll, FXfloat pitch, FXfloat yaw)
 
void getRollPitchYaw (FXfloat &roll, FXfloat &pitch, FXfloat &yaw) const
 
void setYawPitchRoll (FXfloat yaw, FXfloat pitch, FXfloat roll)
 
void getYawPitchRoll (FXfloat &yaw, FXfloat &pitch, FXfloat &roll) const
 
void setRollYawPitch (FXfloat roll, FXfloat yaw, FXfloat pitch)
 
void getRollYawPitch (FXfloat &roll, FXfloat &yaw, FXfloat &pitch) const
 
void setPitchRollYaw (FXfloat pitch, FXfloat roll, FXfloat yaw)
 
void getPitchRollYaw (FXfloat &pitch, FXfloat &roll, FXfloat &yaw) const
 
void setPitchYawRoll (FXfloat pitch, FXfloat yaw, FXfloat roll)
 
void getPitchYawRoll (FXfloat &pitch, FXfloat &yaw, FXfloat &roll) const
 
void setYawRollPitch (FXfloat yaw, FXfloat roll, FXfloat pitch)
 
void getYawRollPitch (FXfloat &yaw, FXfloat &roll, FXfloat &pitch) const
 
void setAxes (const FXVec3f &ex, const FXVec3f &ey, const FXVec3f &ez)
 
void getAxes (FXVec3f &ex, FXVec3f &ey, FXVec3f &ez) const
 
FXVec3f getXAxis () const
 
FXVec3f getYAxis () const
 
FXVec3f getZAxis () const
 
FXQuatf exp () const
 
FXQuatf log () const
 
FXQuatf invert () const
 
FXQuatf unitinvert () const
 
FXQuatf conj () const
 
FXQuatfarc (const FXVec3f &a, const FXVec3f &b)
 
FXQuatflerp (const FXQuatf &u, const FXQuatf &v, FXfloat f)
 
FXQuatf operator* (const FXQuatf &q) const
 
FXVec3f operator* (const FXVec3f &v) const
 
- Public Member Functions inherited from FX::FXVec4f
 FXVec4f ()
 
 FXVec4f (const FXVec4f &v)
 
 FXVec4f (const FXVec3f &v, FXfloat ww=1.0f)
 
 FXVec4f (const FXfloat v[])
 
 FXVec4f (FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww=1.0f)
 
 FXVec4f (FXColor color)
 
FXfloatoperator[] (FXint i)
 
const FXfloatoperator[] (FXint i) const
 
FXVec4foperator= (FXColor color)
 
FXVec4foperator= (const FXVec3f &v)
 
FXVec4foperator= (const FXVec4f &v)
 
FXVec4foperator= (const FXfloat v[])
 
FXVec4fset (const FXVec4f &v)
 
FXVec4fset (const FXfloat v[])
 
FXVec4fset (FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww)
 
FXVec4foperator*= (FXfloat n)
 
FXVec4foperator/= (FXfloat n)
 
FXVec4foperator+= (const FXVec4f &v)
 
FXVec4foperator-= (const FXVec4f &v)
 
 operator FXfloat * ()
 
 operator const FXfloat * () const
 
 operator FXVec3f & ()
 
 operator const FXVec3f & () const
 
 operator FXColor () const
 
FXVec4f operator+ () const
 
FXVec4f operator- () const
 
FXVec4f operator+ (const FXVec4f &v) const
 
FXVec4f operator- (const FXVec4f &v) const
 
FXVec4f operator* (const FXMat4f &m) const
 
FXfloat operator* (const FXVec4f &v) const
 
bool operator! () const
 
bool operator== (const FXVec4f &v) const
 
bool operator!= (const FXVec4f &v) const
 
bool operator< (const FXVec4f &v) const
 
bool operator<= (const FXVec4f &v) const
 
bool operator> (const FXVec4f &v) const
 
bool operator>= (const FXVec4f &v) const
 
FXfloat length2 () const
 
FXfloat length () const
 
FXVec4fclamp (FXfloat lo, FXfloat hi)
 
FXfloat distance (const FXVec3f &p) const
 
bool crosses (const FXVec3f &a, const FXVec3f &b) const
 

Additional Inherited Members

- Public Attributes inherited from FX::FXVec4f
FXfloat x
 
FXfloat y
 
FXfloat z
 
FXfloat w
 

Detailed Description

Single-precision quaternion.

Constructor & Destructor Documentation

FX::FXQuatf::FXQuatf ( )
inline

Construct.

FX::FXQuatf::FXQuatf ( const FXQuatf q)
inline

Copy constructor.

FX::FXQuatf::FXQuatf ( FXfloat  xx,
FXfloat  yy,
FXfloat  zz,
FXfloat  ww 
)
inline

Construct from components.

FX::FXQuatf::FXQuatf ( const FXfloat  v[])
inline

Construct from array of floats.

FX::FXQuatf::FXQuatf ( const FXVec3f axis,
FXfloat  phi = 0.0f 
)

Construct from axis and angle.

FX::FXQuatf::FXQuatf ( FXfloat  roll,
FXfloat  pitch,
FXfloat  yaw 
)

Construct from euler angles yaw (z), pitch (y), and roll (x)

FX::FXQuatf::FXQuatf ( const FXVec3f fr,
const FXVec3f to 
)

Construct quaternion from two unit vectors.

FX::FXQuatf::FXQuatf ( const FXVec3f ex,
const FXVec3f ey,
const FXVec3f ez 
)

Construct quaternion from three axes.

FX::FXQuatf::FXQuatf ( const FXMat3f mat)

Construct quaternion from 3x3 matrix.

Member Function Documentation

FXQuatf& FX::FXQuatf::adjust ( )

Adjust quaternion length.

void FX::FXQuatf::setAxisAngle ( const FXVec3f axis,
FXfloat  phi = 0.0f 
)

Set quaternion from axis and angle.

void FX::FXQuatf::getAxisAngle ( FXVec3f axis,
FXfloat phi 
) const

Obtain axis and angle from quaternion.

void FX::FXQuatf::setRollPitchYaw ( FXfloat  roll,
FXfloat  pitch,
FXfloat  yaw 
)

Set quaternion from roll (x), pitch (y), yaw (z)

void FX::FXQuatf::getRollPitchYaw ( FXfloat roll,
FXfloat pitch,
FXfloat yaw 
) const
void FX::FXQuatf::setYawPitchRoll ( FXfloat  yaw,
FXfloat  pitch,
FXfloat  roll 
)

Set quaternion from yaw (z), pitch (y), roll (x)

void FX::FXQuatf::getYawPitchRoll ( FXfloat yaw,
FXfloat pitch,
FXfloat roll 
) const
void FX::FXQuatf::setRollYawPitch ( FXfloat  roll,
FXfloat  yaw,
FXfloat  pitch 
)

Set quaternion from roll (x), yaw (z), pitch (y)

void FX::FXQuatf::getRollYawPitch ( FXfloat roll,
FXfloat yaw,
FXfloat pitch 
) const
void FX::FXQuatf::setPitchRollYaw ( FXfloat  pitch,
FXfloat  roll,
FXfloat  yaw 
)

Set quaternion from pitch (y), roll (x),yaw (z)

void FX::FXQuatf::getPitchRollYaw ( FXfloat pitch,
FXfloat roll,
FXfloat yaw 
) const
void FX::FXQuatf::setPitchYawRoll ( FXfloat  pitch,
FXfloat  yaw,
FXfloat  roll 
)

Set quaternion from pitch (y), yaw (z), roll (x)

void FX::FXQuatf::getPitchYawRoll ( FXfloat pitch,
FXfloat yaw,
FXfloat roll 
) const
void FX::FXQuatf::setYawRollPitch ( FXfloat  yaw,
FXfloat  roll,
FXfloat  pitch 
)

Set quaternion from yaw (z), roll (x), pitch (y)

void FX::FXQuatf::getYawRollPitch ( FXfloat yaw,
FXfloat roll,
FXfloat pitch 
) const
void FX::FXQuatf::setAxes ( const FXVec3f ex,
const FXVec3f ey,
const FXVec3f ez 
)

Set quaternion from axes.

void FX::FXQuatf::getAxes ( FXVec3f ex,
FXVec3f ey,
FXVec3f ez 
) const

Get quaternion axes.

FXVec3f FX::FXQuatf::getXAxis ( ) const

Obtain local x axis.

FXVec3f FX::FXQuatf::getYAxis ( ) const

Obtain local y axis.

FXVec3f FX::FXQuatf::getZAxis ( ) const

Obtain local z axis.

FXQuatf FX::FXQuatf::exp ( ) const

Exponentiate quaternion.

FXQuatf FX::FXQuatf::log ( ) const

Take logarithm of quaternion.

FXQuatf FX::FXQuatf::invert ( ) const

Invert quaternion.

FXQuatf FX::FXQuatf::unitinvert ( ) const

Invert unit quaternion.

FXQuatf FX::FXQuatf::conj ( ) const

Conjugate quaternion.

FXQuatf& FX::FXQuatf::arc ( const FXVec3f a,
const FXVec3f b 
)

Construct quaternion from arc a->b on unit sphere.

FXQuatf& FX::FXQuatf::lerp ( const FXQuatf u,
const FXQuatf v,
FXfloat  f 
)

Spherical lerp.

FXQuatf FX::FXQuatf::operator* ( const FXQuatf q) const

Multiply quaternions.

FXVec3f FX::FXQuatf::operator* ( const FXVec3f v) const

Rotation of a vector by a quaternion.

Copyright © 1997-2005 Jeroen van der Zijp