|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CQuatT Class Template ReferenceA Template quaternion.
More...
#include <quat.h>
List of all members.
Public Methods |
|
| CQuatT () |
| CQuatT (T X, T Y, T Z, T W) |
| CQuatT (const CVector &axis, float angle) |
| ctor of a UNIT quaternion, from an angle axis. More...
|
| CQuatT (const CAngleAxis &aa) |
| ctor of a UNIT quaternion, from an angle axis. More...
|
|
void | set (T X, T Y, T Z, T W) |
|
bool | operator== (const CQuatT &a) const |
bool | equal (const CQuatT &a, float epsilon=1E-6f) const |
void | identity () |
bool | isIdentity () const |
|
CQuatT & | operator+= (const CQuatT &o) |
CQuatT & | operator-= (const CQuatT &o) |
CQuatT & | operator *= (T f) |
CQuatT & | operator/= (T f) |
CQuatT | operator+ (const CQuatT &o) const |
CQuatT | operator- (const CQuatT &o) const |
CQuatT | operator * (T f) const |
CQuatT | operator/ (T f) const |
CQuatT | operator- () const |
CQuatT | operator+ () const |
T | sqrnorm () const |
| return the square of the norm of the 4D vector. More...
|
T | norm () const |
| return the norm of the 4D vector. More...
|
void | normalize () |
| Normalize the quaternion. More...
|
CQuatT | normed () const |
| Return the quaternion normalized. More...
|
|
CQuatT | operator * (const CQuatT &) const |
| Quaternion multiplication/composition. More...
|
CQuatT & | operator *= (const CQuatT &) |
void | invert () |
| Invert this quaternion. If normalized, conjugate is faster and does same thing. More...
|
CQuatT | inverted () const |
| return the quaternion inverted. More...
|
CQuatT | conjugate () const |
| return the conjugate of this quaternion. More...
|
|
CVector | getAxis () const |
| Return the equivalent Unit axis of this quaternion. More...
|
float | getAngle () const |
| Return the equivalent angle of this quaternion. (in radian). More...
|
CAngleAxis | getAngleAxis () const |
| Return the equivalent Unit AngleAxis of this quaternion. More...
|
void | setAngleAxis (const CVector &axis, float angle) |
| Build a UNIT quaternion from an AngleAxis. More...
|
void | setAngleAxis (const CAngleAxis &angAxis) |
| Build a UNIT quaternion from an AngleAxis. More...
|
|
CQuatT | log () |
| compute logn quaternion. More...
|
CQuatT | exp () |
| compute quaternion exponent. More...
|
void | makeClosest (const CQuatT &o) |
| ensure that *this and q are on same side of hypersphere, ie dotProduct(*this,q) is >0, modifying this if necessary. More...
|
void | serial (IStream &f) |
| serial. More...
|
Static Public Methods |
|
T | dotProduct (const CQuatT< T > &q0, const CQuatT< T > &q1) |
| Return the dotProduct of 2 quaternions. More...
|
CQuatT | slerp (const CQuatT< T > &q0, const CQuatT< T > &q1, float t) |
| Quaternion spherical linear interpolation. More...
|
CQuatT | squad (const CQuatT< T > &q0, const CQuatT< T > &tgtQ0, const CQuatT< T > &tgtQ1, const CQuatT< T > &q1, float t) |
| Quaternion Quadratic spherical linear interpolation. More...
|
CQuatT | squadrev (const CAngleAxis &rot, const CQuatT< T > &q0, const CQuatT< T > &tgtQ0, const CQuatT< T > &tgtQ1, const CQuatT< T > &q1, float t) |
| Quaternion Quadratic spherical linear interpolation, with multi revision support. More...
|
CQuatT | lnDif (const CQuatT &q0, const CQuatT &q1) |
| compute lnDiff of q0.inverted()*q1. More...
|
Public Attributes |
T | x |
T | y |
T | z |
T | w |
Detailed Description
template<class T>
class NLMISC::CQuatT< T >
A Template quaternion.
Use CQuat and CQuatD. -
Author:
-
Antoine Viau. , Nevrax France
-
Date:
-
2000
Definition at line 74 of file quat.h.
Constructor & Destructor Documentation
template<class T> |
NLMISC::CQuatT< T >::CQuatT |
( |
|
) |
[inline] |
|
|
Definition at line 84 of file quat.h.
Referenced by NLMISC::CQuatT< float >::conjugate, NLMISC::CQuatT< float >::inverted, NLMISC::CQuatT< float >::normed, NLMISC::CQuatT< float >::operator *, NLMISC::CQuatT< float >::operator *=, NLMISC::CQuatT< float >::operator+, NLMISC::CQuatT< float >::operator+=, NLMISC::CQuatT< float >::operator-, NLMISC::CQuatT< float >::operator-=, NLMISC::CQuatT< float >::operator/, NLMISC::CQuatT< float >::operator/=, and NLMISC::CQuatT< float >::operator==. |
template<class T> |
NLMISC::CQuatT< T >::CQuatT |
( |
T |
X, |
|
|
T |
Y, |
|
|
T |
Z, |
|
|
T |
W |
|
) |
[inline] |
|
template<class T> |
NLMISC::CQuatT< T >::CQuatT |
( |
const CVector & |
axis, |
|
|
float |
angle |
|
) |
[inline] |
|
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 87 of file quat.h. |
template<class T> |
NLMISC::CQuatT< T >::CQuatT |
( |
const CAngleAxis & |
aa |
) |
[inline] |
|
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 89 of file quat.h. |
Member Function Documentation
template<class T> |
CQuatT NLMISC::CQuatT< T >::conjugate |
( |
|
) |
const [inline] |
|
|
return the conjugate of this quaternion.
Definition at line 139 of file quat.h.
Referenced by invert. |
template<class T> |
T NLMISC::CQuatT< T >::dotProduct |
( |
const CQuatT< T > & |
q0, |
|
|
const CQuatT< T > & |
q1 |
|
) |
[static] |
|
|
Return the dotProduct of 2 quaternions.
Definition at line 309 of file quat.h.
Referenced by makeClosest. |
template<class T> |
bool NLMISC::CQuatT< T >::equal |
( |
const CQuatT< T > & |
a, |
|
|
float |
epsilon = 1E-6f |
|
) |
const [inline] |
|
|
Definition at line 227 of file quat.h.
References w, x, y, and z. |
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::exp |
( |
|
) |
|
|
template<class T> |
float NLMISC::CQuatT< T >::getAngle |
( |
|
) |
const [inline] |
|
|
Return the equivalent angle of this quaternion. (in radian).
Definition at line 148 of file quat.h. |
template<class T> |
CAngleAxis NLMISC::CQuatT< T >::getAngleAxis |
( |
|
) |
const [inline] |
|
|
Return the equivalent Unit AngleAxis of this quaternion.
Definition at line 150 of file quat.h. |
template<class T> |
CVector NLMISC::CQuatT< T >::getAxis |
( |
|
) |
const [inline] |
|
|
Return the equivalent Unit axis of this quaternion.
Definition at line 146 of file quat.h. |
template<class T> |
void NLMISC::CQuatT< T >::identity |
( |
|
) |
[inline] |
|
template<class T> |
void NLMISC::CQuatT< T >::invert |
( |
|
) |
[inline] |
|
|
Invert this quaternion. If normalized, conjugate is faster and does same thing.
Definition at line 265 of file quat.h.
References conjugate, and sqrnorm. |
template<class T> |
CQuatT NLMISC::CQuatT< T >::inverted |
( |
|
) |
const [inline] |
|
|
return the quaternion inverted.
Definition at line 137 of file quat.h. |
template<class T> |
bool NLMISC::CQuatT< T >::isIdentity |
( |
|
) |
const [inline] |
|
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::lnDif |
( |
const CQuatT< T > & |
q0, |
|
|
const CQuatT< T > & |
q1 |
|
) |
[static] |
|
|
compute lnDiff of q0.inverted()*q1.
Definition at line 462 of file quat.h. |
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::log |
( |
|
) |
|
|
template<class T> |
void NLMISC::CQuatT< T >::makeClosest |
( |
const CQuatT< T > & |
o |
) |
|
|
|
ensure that *this and q are on same side of hypersphere, ie dotProduct(*this,q) is >0, modifying this if necessary.
Definition at line 473 of file quat.h.
References dotProduct. |
template<class T> |
T NLMISC::CQuatT< T >::norm |
( |
|
) |
const [inline] |
|
|
return the norm of the 4D vector.
Definition at line 121 of file quat.h.
Referenced by normalize. |
template<class T> |
void NLMISC::CQuatT< T >::normalize |
( |
|
) |
[inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::normed |
( |
|
) |
const [inline] |
|
|
Return the quaternion normalized.
Definition at line 125 of file quat.h. |
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::operator * |
( |
const CQuatT< T > & |
|
) |
const [inline] |
|
|
Quaternion multiplication/composition.
Definition at line 242 of file quat.h.
References w, x, y, and z. |
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator * |
( |
T |
f |
) |
const [inline] |
|
template<class T> |
CQuatT< T > & NLMISC::CQuatT< T >::operator *= |
( |
const CQuatT< T > & |
|
) |
[inline] |
|
template<class T> |
CQuatT& NLMISC::CQuatT< T >::operator *= |
( |
T |
f |
) |
[inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator+ |
( |
|
) |
const [inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator+ |
( |
const CQuatT< T > & |
o |
) |
const [inline] |
|
template<class T> |
CQuatT& NLMISC::CQuatT< T >::operator+= |
( |
const CQuatT< T > & |
o |
) |
[inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator- |
( |
|
) |
const [inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator- |
( |
const CQuatT< T > & |
o |
) |
const [inline] |
|
template<class T> |
CQuatT& NLMISC::CQuatT< T >::operator-= |
( |
const CQuatT< T > & |
o |
) |
[inline] |
|
template<class T> |
CQuatT NLMISC::CQuatT< T >::operator/ |
( |
T |
f |
) |
const [inline] |
|
template<class T> |
CQuatT& NLMISC::CQuatT< T >::operator/= |
( |
T |
f |
) |
[inline] |
|
template<class T> |
bool NLMISC::CQuatT< T >::operator== |
( |
const CQuatT< T > & |
a |
) |
const [inline] |
|
template<class T> |
void NLMISC::CQuatT< T >::serial |
( |
IStream & |
f |
) |
[inline] |
|
|
serial.
Definition at line 168 of file quat.h. |
template<class T> |
void NLMISC::CQuatT< T >::set |
( |
T |
X, |
|
|
T |
Y, |
|
|
T |
Z, |
|
|
T |
W |
|
) |
[inline] |
|
template<class T> |
void NLMISC::CQuatT< T >::setAngleAxis |
( |
const CAngleAxis & |
angAxis |
) |
[inline] |
|
|
Build a UNIT quaternion from an AngleAxis.
Definition at line 155 of file quat.h. |
template<class T> |
void NLMISC::CQuatT< T >::setAngleAxis |
( |
const CVector & |
axis, |
|
|
float |
angle |
|
) |
[inline] |
|
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::slerp |
( |
const CQuatT< T > & |
q0, |
|
|
const CQuatT< T > & |
q1, |
|
|
float |
t |
|
) |
[static] |
|
|
Quaternion spherical linear interpolation.
when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made.
Definition at line 317 of file quat.h.
References t.
Referenced by squad. |
template<class T> |
T NLMISC::CQuatT< T >::sqrnorm |
( |
|
) |
const [inline] |
|
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::squad |
( |
const CQuatT< T > & |
q0, |
|
|
const CQuatT< T > & |
tgtQ0, |
|
|
const CQuatT< T > & |
tgtQ1, |
|
|
const CQuatT< T > & |
q1, |
|
|
float |
t |
|
) |
[static] |
|
|
Quaternion Quadratic spherical linear interpolation.
when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made.
Definition at line 355 of file quat.h.
References slerp, and t. |
template<class T> |
CQuatT< T > NLMISC::CQuatT< T >::squadrev |
( |
const CAngleAxis & |
rot, |
|
|
const CQuatT< T > & |
q0, |
|
|
const CQuatT< T > & |
tgtQ0, |
|
|
const CQuatT< T > & |
tgtQ1, |
|
|
const CQuatT< T > & |
q1, |
|
|
float |
t |
|
) |
[static] |
|
Member Data Documentation
template<class T> |
T NLMISC::CQuatT::w
|
|
|
Definition at line 77 of file quat.h.
Referenced by NLMISC::CQuatT< float >::conjugate, NLMISC::CQuatT< float >::CQuatT, equal, NLMISC::CQuatT< float >::identity, NLMISC::CQuatT< float >::isIdentity, log, operator *, NLMISC::CQuatT< float >::operator *, NLMISC::CQuatT< float >::operator *=, NLMISC::CQuatT< float >::operator+, NLMISC::CQuatT< float >::operator+=, NLMISC::CQuatT< float >::operator-, NLMISC::CQuatT< float >::operator-=, NLMISC::CQuatT< float >::operator/, NLMISC::CQuatT< float >::operator/=, NLMISC::CQuatT< float >::operator==, NLMISC::CQuatT< float >::serial, NLMISC::CQuatT< float >::set, setAngleAxis, and NLMISC::CQuatT< float >::sqrnorm. |
template<class T> |
T NLMISC::CQuatT::x
|
|
|
Definition at line 77 of file quat.h.
Referenced by NLMISC::CQuatT< float >::conjugate, NLMISC::CQuatT< float >::CQuatT, equal, exp, NLMISC::CQuatT< float >::identity, NLMISC::CQuatT< float >::isIdentity, log, operator *, NLMISC::CQuatT< float >::operator *, NLMISC::CQuatT< float >::operator *=, NLMISC::CQuatT< float >::operator+, NLMISC::CQuatT< float >::operator+=, NLMISC::CQuatT< float >::operator-, NLMISC::CQuatT< float >::operator-=, NLMISC::CQuatT< float >::operator/, NLMISC::CQuatT< float >::operator/=, NLMISC::CQuatT< float >::operator==, NLMISC::CQuatT< float >::serial, NLMISC::CQuatT< float >::set, setAngleAxis, and NLMISC::CQuatT< float >::sqrnorm. |
template<class T> |
T NLMISC::CQuatT::y
|
|
|
Definition at line 77 of file quat.h.
Referenced by NLMISC::CQuatT< float >::conjugate, NLMISC::CQuatT< float >::CQuatT, equal, exp, NLMISC::CQuatT< float >::identity, NLMISC::CQuatT< float >::isIdentity, log, operator *, NLMISC::CQuatT< float >::operator *, NLMISC::CQuatT< float >::operator *=, NLMISC::CQuatT< float >::operator+, NLMISC::CQuatT< float >::operator+=, NLMISC::CQuatT< float >::operator-, NLMISC::CQuatT< float >::operator-=, NLMISC::CQuatT< float >::operator/, NLMISC::CQuatT< float >::operator/=, NLMISC::CQuatT< float >::operator==, NLMISC::CQuatT< float >::serial, NLMISC::CQuatT< float >::set, setAngleAxis, and NLMISC::CQuatT< float >::sqrnorm. |
template<class T> |
T NLMISC::CQuatT::z
|
|
|
Definition at line 77 of file quat.h.
Referenced by NLMISC::CQuatT< float >::conjugate, NLMISC::CQuatT< float >::CQuatT, equal, exp, NLMISC::CQuatT< float >::identity, NLMISC::CQuatT< float >::isIdentity, log, operator *, NLMISC::CQuatT< float >::operator *, NLMISC::CQuatT< float >::operator *=, NLMISC::CQuatT< float >::operator+, NLMISC::CQuatT< float >::operator+=, NLMISC::CQuatT< float >::operator-, NLMISC::CQuatT< float >::operator-=, NLMISC::CQuatT< float >::operator/, NLMISC::CQuatT< float >::operator/=, NLMISC::CQuatT< float >::operator==, NLMISC::CQuatT< float >::serial, NLMISC::CQuatT< float >::set, setAngleAxis, and NLMISC::CQuatT< float >::sqrnorm. |
The documentation for this class was generated from the following file:
|
|