UT_QuaternionT< T > Class Template Reference

#include <UT_Quaternion.h>

List of all members.

Public Member Functions

 UT_QuaternionT (T qx=0, T qy=0, T qz=0, T qw=0)
 UT_QuaternionT (T angle, const UT_Vector3T< T > &axis, int donormalize=1)
 UT_QuaternionT (const UT_QuaternionT< T > &q)
 UT_QuaternionT (const UT_Vector3T< T > &rot, const UT_XformOrder &order)
template<typename S >
 UT_QuaternionT (const UT_QuaternionT< S > &v)
template<typename S >
UT_QuaternionT< T > & operator= (const UT_QuaternionT< S > &v)
UT_QuaternionT< T > & operator*= (const UT_QuaternionT< T > &q)
UT_QuaternionT< T > & operator*= (T scalar)
UT_QuaternionT< T > & operator/= (const UT_QuaternionT< T > &quat)
UT_QuaternionT< T > & operator/= (T scalar)
UT_QuaternionT< T > & operator+= (const UT_QuaternionT< T > &quat)
bool operator== (const UT_QuaternionT< T > &quat) const
bool operator!= (const UT_QuaternionT< T > &quat) const
operator() (int idx) const
T & operator() (int idx)
operator[] (int idx) const
T & operator[] (int idx)
bool isEqual (const UT_QuaternionT< T > &quat, T tol=FP32_TOLERANCE) const
void getRotationMatrix (UT_Matrix3 &mat) const
void getRotationMatrix (UT_DMatrix3 &mat) const
void getTransformMatrix (UT_Matrix4 &mat) const
void getTransformMatrix (UT_DMatrix4 &mat) const
UT_QuaternionT< T > interpolate (const UT_QuaternionT< T > &target, T t, T b=0.0f) const
void assign (T qx, T qy, T qz, T qw)
void identity ()
void conjugate ()
void negate ()
normal () const
void normalize ()
length () const
void invert ()
void updateFromVectors (const UT_Vector3T< T > &v1, const UT_Vector3T< T > &v2)
void updateFromRotationMatrix (const UT_Matrix3 &)
void updateFromRotationMatrix (const UT_DMatrix3 &)
void updateFromAngleAxis (T angle, const UT_Vector3T< T > &axis, int normalize=1)
void getAngleAxis (T &angle, UT_Vector3T< T > &axis) const
void updateFromLogMap (const UT_Vector3T< T > &v)
void getLogMap (UT_Vector3T< T > &v) const
void updateFromEuler (const UT_Vector3T< T > &rot, const UT_XformOrder &order)
void computeDerivative (const UT_Vector3T< T > &omega, UT_QuaternionT< T > &q_prime)
UT_Vector3T< T > computeAngVel (const UT_QuaternionT< T > &dest, T time) const
void integrate (const UT_Vector3T< T > &angvel, T timestep, bool accurate=true)
UT_Vector3T< T > computeRotations (const UT_XformOrder &) const
UT_Vector3T< T > rotate (const UT_Vector3T< T > &) const
UT_Vector3T< T > rotateInverse (const UT_Vector3T< T > &) const
void multAngle (T s)
T & x ()
T & y ()
T & z ()
T & w ()
x () const
y () const
z () const
w () const
void save (ostream &os, int binary=0) const
bool load (UT_IStream &is)
const T * data (void) const
T * data (void)
unsigned hash () const
 Compute a hash.
bool save (UT_JSONWriter &w) const
bool save (UT_JSONValue &v) const
bool load (UT_JSONParser &p)

Protected Member Functions

void initialize (T qx=0, T qy=0, T qz=0, T qw=0)

Friends

ostream & operator<< (ostream &os, const UT_QuaternionT< T > &v)


Detailed Description

template<typename T>
class UT_QuaternionT< T >

Definition at line 37 of file UT_Quaternion.h.


Constructor & Destructor Documentation

template<typename T>
UT_QuaternionT< T >::UT_QuaternionT ( qx = 0,
qy = 0,
qz = 0,
qw = 0 
) [inline]

Definition at line 40 of file UT_Quaternion.h.

template<typename T>
UT_QuaternionT< T >::UT_QuaternionT ( angle,
const UT_Vector3T< T > &  axis,
int  donormalize = 1 
)

template<typename T>
UT_QuaternionT< T >::UT_QuaternionT ( const UT_QuaternionT< T > &  q  )  [inline]

Definition at line 49 of file UT_Quaternion.h.

template<typename T>
UT_QuaternionT< T >::UT_QuaternionT ( const UT_Vector3T< T > &  rot,
const UT_XformOrder order 
) [inline]

Definition at line 56 of file UT_Quaternion.h.

template<typename T>
template<typename S >
UT_QuaternionT< T >::UT_QuaternionT ( const UT_QuaternionT< S > &  v  )  [inline]


Member Function Documentation

template<typename T>
void UT_QuaternionT< T >::assign ( qx,
qy,
qz,
qw 
) [inline]

Definition at line 101 of file UT_Quaternion.h.

template<typename T>
UT_Vector3T<T> UT_QuaternionT< T >::computeAngVel ( const UT_QuaternionT< T > &  dest,
time 
) const

template<typename T>
void UT_QuaternionT< T >::computeDerivative ( const UT_Vector3T< T > &  omega,
UT_QuaternionT< T > &  q_prime 
)

template<typename T>
UT_Vector3T<T> UT_QuaternionT< T >::computeRotations ( const UT_XformOrder  )  const

template<typename T>
void UT_QuaternionT< T >::conjugate (  )  [inline]

Definition at line 112 of file UT_Quaternion.h.

template<typename T>
T* UT_QuaternionT< T >::data ( void   )  [inline]

Definition at line 239 of file UT_Quaternion.h.

template<typename T>
const T* UT_QuaternionT< T >::data ( void   )  const [inline]

Definition at line 238 of file UT_Quaternion.h.

template<typename T>
void UT_QuaternionT< T >::getAngleAxis ( T &  angle,
UT_Vector3T< T > &  axis 
) const

template<typename T>
void UT_QuaternionT< T >::getLogMap ( UT_Vector3T< T > &  v  )  const

template<typename T>
void UT_QuaternionT< T >::getRotationMatrix ( UT_DMatrix3 mat  )  const

template<typename T>
void UT_QuaternionT< T >::getRotationMatrix ( UT_Matrix3 mat  )  const

template<typename T>
void UT_QuaternionT< T >::getTransformMatrix ( UT_DMatrix4 mat  )  const

template<typename T>
void UT_QuaternionT< T >::getTransformMatrix ( UT_Matrix4 mat  )  const

template<typename T>
unsigned UT_QuaternionT< T >::hash (  )  const [inline]

Compute a hash.

Definition at line 242 of file UT_Quaternion.h.

template<typename T>
void UT_QuaternionT< T >::identity (  )  [inline]

Definition at line 107 of file UT_Quaternion.h.

template<typename T>
void UT_QuaternionT< T >::initialize ( qx = 0,
qy = 0,
qz = 0,
qw = 0 
) [inline, protected]

Definition at line 245 of file UT_Quaternion.h.

template<typename T>
void UT_QuaternionT< T >::integrate ( const UT_Vector3T< T > &  angvel,
timestep,
bool  accurate = true 
)

template<typename T>
UT_QuaternionT<T> UT_QuaternionT< T >::interpolate ( const UT_QuaternionT< T > &  target,
t,
b = 0.0f 
) const

template<typename T>
void UT_QuaternionT< T >::invert ( void   )  [inline]

Definition at line 145 of file UT_Quaternion.h.

template<typename T>
bool UT_QuaternionT< T >::isEqual ( const UT_QuaternionT< T > &  quat,
tol = FP32_TOLERANCE 
) const

template<typename T>
T UT_QuaternionT< T >::length (  )  const [inline]

Definition at line 141 of file UT_Quaternion.h.

template<typename T>
bool UT_QuaternionT< T >::load ( UT_JSONParser p  ) 

Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.

template<typename T>
bool UT_QuaternionT< T >::load ( UT_IStream is  ) 

template<typename T>
void UT_QuaternionT< T >::multAngle ( s  ) 

template<typename T>
void UT_QuaternionT< T >::negate ( void   )  [inline]

Definition at line 118 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::normal ( void   )  const [inline]

Definition at line 125 of file UT_Quaternion.h.

template<typename T>
void UT_QuaternionT< T >::normalize (  )  [inline]

Definition at line 132 of file UT_Quaternion.h.

template<typename T>
bool UT_QuaternionT< T >::operator!= ( const UT_QuaternionT< T > &  quat  )  const

template<typename T>
T& UT_QuaternionT< T >::operator() ( int  idx  )  [inline]

Definition at line 79 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::operator() ( int  idx  )  const [inline]

Definition at line 77 of file UT_Quaternion.h.

template<typename T>
UT_QuaternionT<T>& UT_QuaternionT< T >::operator*= ( scalar  ) 

template<typename T>
UT_QuaternionT<T>& UT_QuaternionT< T >::operator*= ( const UT_QuaternionT< T > &  q  ) 

template<typename T>
UT_QuaternionT<T>& UT_QuaternionT< T >::operator+= ( const UT_QuaternionT< T > &  quat  ) 

template<typename T>
UT_QuaternionT<T>& UT_QuaternionT< T >::operator/= ( scalar  ) 

template<typename T>
UT_QuaternionT<T>& UT_QuaternionT< T >::operator/= ( const UT_QuaternionT< T > &  quat  ) 

template<typename T>
template<typename S >
UT_QuaternionT<T>& UT_QuaternionT< T >::operator= ( const UT_QuaternionT< S > &  v  )  [inline]

Definition at line 67 of file UT_Quaternion.h.

template<typename T>
bool UT_QuaternionT< T >::operator== ( const UT_QuaternionT< T > &  quat  )  const

template<typename T>
T& UT_QuaternionT< T >::operator[] ( int  idx  )  [inline]

Definition at line 83 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::operator[] ( int  idx  )  const [inline]

Definition at line 81 of file UT_Quaternion.h.

template<typename T>
UT_Vector3T<T> UT_QuaternionT< T >::rotate ( const UT_Vector3T< T > &   )  const

Rotates a vector by this quaternion Requires that this is normalized.

template<typename T>
UT_Vector3T<T> UT_QuaternionT< T >::rotateInverse ( const UT_Vector3T< T > &   )  const

rotates a vector by the inverse of this quaternion. Requires that this is normalized.

template<typename T>
bool UT_QuaternionT< T >::save ( UT_JSONValue v  )  const

Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.

template<typename T>
bool UT_QuaternionT< T >::save ( UT_JSONWriter w  )  const

Methods to serialize to a JSON stream. The vector is stored as an array of 4 reals.

template<typename T>
void UT_QuaternionT< T >::save ( ostream &  os,
int  binary = 0 
) const

template<typename T>
void UT_QuaternionT< T >::updateFromAngleAxis ( angle,
const UT_Vector3T< T > &  axis,
int  normalize = 1 
)

template<typename T>
void UT_QuaternionT< T >::updateFromEuler ( const UT_Vector3T< T > &  rot,
const UT_XformOrder order 
)

template<typename T>
void UT_QuaternionT< T >::updateFromLogMap ( const UT_Vector3T< T > &  v  ) 

template<typename T>
void UT_QuaternionT< T >::updateFromRotationMatrix ( const UT_DMatrix3  ) 

template<typename T>
void UT_QuaternionT< T >::updateFromRotationMatrix ( const UT_Matrix3  ) 

template<typename T>
void UT_QuaternionT< T >::updateFromVectors ( const UT_Vector3T< T > &  v1,
const UT_Vector3T< T > &  v2 
)

template<typename T>
T UT_QuaternionT< T >::w (  )  const [inline]

Definition at line 225 of file UT_Quaternion.h.

template<typename T>
T& UT_QuaternionT< T >::w (  )  [inline]

Definition at line 220 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::x (  )  const [inline]

Definition at line 222 of file UT_Quaternion.h.

template<typename T>
T& UT_QuaternionT< T >::x (  )  [inline]

Definition at line 217 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::y (  )  const [inline]

Definition at line 223 of file UT_Quaternion.h.

template<typename T>
T& UT_QuaternionT< T >::y (  )  [inline]

Definition at line 218 of file UT_Quaternion.h.

template<typename T>
T UT_QuaternionT< T >::z (  )  const [inline]

Definition at line 224 of file UT_Quaternion.h.

template<typename T>
T& UT_QuaternionT< T >::z (  )  [inline]

Definition at line 219 of file UT_Quaternion.h.


Friends And Related Function Documentation

template<typename T>
ostream& operator<< ( ostream &  os,
const UT_QuaternionT< T > &  v 
) [friend]

Definition at line 253 of file UT_Quaternion.h.


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

Generated on Mon Jan 28 00:30:17 2013 for HDK by  doxygen 1.5.9