#include <quat.h>
Inheritance diagram for NLMISC::CQuatD:
Nevrax France
Definition at line 523 of file quat.h.
Public Member Functions | |
CQuatT | conjugate () const |
return the conjugate of this quaternion. | |
bool | equal (const CQuatT &a, float epsilon=1E-6f) const |
CQuatT | exp () |
compute quaternion exponent. | |
float | getAngle () const |
Return the equivalent angle of this quaternion. (in radian). | |
CAngleAxis | getAngleAxis () const |
Return the equivalent Unit AngleAxis of this quaternion. | |
CVector | getAxis () const |
Return the equivalent Unit axis of this quaternion. | |
void | identity () |
void | invert () |
Invert this quaternion. If normalized, conjugate is faster and does same thing. | |
CQuatT | inverted () const |
return the quaternion inverted. | |
bool | isIdentity () const |
CQuatT | log () |
compute logn quaternion. | |
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. | |
double | norm () const |
return the norm of the 4D vector. | |
void | normalize () |
Normalize the quaternion. | |
CQuatT | normed () const |
Return the quaternion normalized. | |
CQuatT | operator * (const CQuatT &) const |
Quaternion multiplication/composition. | |
CQuatT | operator * (doublef) const |
CQuatT & | operator *= (const CQuatT &) |
CQuatT & | operator *= (doublef) |
CQuatT | operator+ () const |
CQuatT | operator+ (const CQuatT &o) const |
CQuatT & | operator+= (const CQuatT &o) |
CQuatT | operator- () const |
CQuatT | operator- (const CQuatT &o) const |
CQuatT & | operator-= (const CQuatT &o) |
CQuatT | operator/ (doublef) const |
CQuatT & | operator/= (doublef) |
bool | operator== (const CQuatT &a) const |
void | serial (IStream &f) |
serial. | |
void | set (doubleX, doubleY, doubleZ, doubleW) |
void | setAngleAxis (const CAngleAxis &angAxis) |
Build a UNIT quaternion from an AngleAxis. | |
void | setAngleAxis (const CVector &axis, float angle) |
Build a UNIT quaternion from an AngleAxis. | |
double | sqrnorm () const |
return the square of the norm of the 4D vector. | |
CQuat conversion. | |
CQuatD (const CQuat &o) | |
operator CQuat () const | |
CQuatD & | operator= (const CQuatT< float > &o) |
Object | |
CQuatD (const CAngleAxis &aa) | |
ctor of a UNIT quaternion, from an angle axis. | |
CQuatD (const CVector &axis, float angle) | |
ctor of a UNIT quaternion, from an angle axis. | |
CQuatD (double X, double Y, double Z, double W) | |
ctor of a UNIT quaternion, from an angle axis. | |
CQuatD () | |
ctor of a UNIT quaternion, from an angle axis. | |
CQuatD (const CQuatT< double > &o) | |
ctor of a UNIT quaternion, from an angle axis. | |
CQuatD & | operator= (const CQuatT< double > &o) |
ctor of a UNIT quaternion, from an angle axis. | |
Static Public Member Functions | |
double | dotProduct (const CQuatT< double > &q0, const CQuatT< double > &q1) |
Return the dotProduct of 2 quaternions. | |
CQuatT | lnDif (const CQuatT &q0, const CQuatT &q1) |
compute lnDiff of q0.inverted()*q1. | |
CQuatT | slerp (const CQuatT< double > &q0, const CQuatT< double > &q1, float t) |
CQuatT | squad (const CQuatT< double > &q0, const CQuatT< double > &tgtQ0, const CQuatT< double > &tgtQ1, const CQuatT< double > &q1, float t) |
CQuatT | squadrev (const CAngleAxis &rot, const CQuatT< double > &q0, const CQuatT< double > &tgtQ0, const CQuatT< double > &tgtQ1, const CQuatT< double > &q1, float t) |
Data Fields | |
double | w |
double | x |
double | y |
double | z |
Static Public Attributes | |
const CQuatD | Identity |
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 531 of file quat.h.
00531 : CQuatT<double>(o) {} |
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 532 of file quat.h.
00532 {} |
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 533 of file quat.h.
00533 : CQuatT<double>(X,Y,Z,W) {} |
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 535 of file quat.h.
00535 : CQuatT<double>(axis, angle) {} |
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 537 of file quat.h.
00537 : CQuatT<double>(aa) {} |
|
Definition at line 543 of file quat.h. References NLMISC::CQuatT< float >::w, w, NLMISC::CQuatT< float >::x, x, NLMISC::CQuatT< float >::y, y, NLMISC::CQuatT< float >::z, and z.
|
|
return the conjugate of this quaternion.
Definition at line 139 of file quat.h. Referenced by NL3D::CAnimationOptimizer::nearlySameQuaternion().
|
|
Return the dotProduct of 2 quaternions.
|
|
|
|
compute quaternion exponent.
|
|
Return the equivalent angle of this quaternion. (in radian).
Definition at line 148 of file quat.h.
|
|
Return the equivalent Unit AngleAxis of this quaternion.
Definition at line 150 of file quat.h.
|
|
Return the equivalent Unit axis of this quaternion.
Definition at line 146 of file quat.h.
|
|
Definition at line 102 of file quat.h.
|
|
Invert this quaternion. If normalized, conjugate is faster and does same thing.
|
|
return the quaternion inverted.
Definition at line 137 of file quat.h.
00137 {CQuatT ret= *this; ret.invert(); return ret;} |
|
Definition at line 103 of file quat.h.
|
|
compute lnDiff of q0.inverted()*q1.
|
|
compute logn quaternion.
|
|
ensure that *this and q are on same side of hypersphere, ie dotProduct(*this,q) is >0, modifying this if necessary.
|
|
return the norm of the 4D vector.
Definition at line 121 of file quat.h.
00121 {return (T)sqrt(sqrnorm());} |
|
Normalize the quaternion.
|
|
Return the quaternion normalized.
Definition at line 125 of file quat.h.
00125 {CQuatT ret= *this; ret.normalize(); return ret;} |
|
Quaternion multiplication/composition.
|
|
return the norm of the 4D vector.
Definition at line 114 of file quat.h.
|
|
return the conjugate of this quaternion.
|
|
return the norm of the 4D vector.
Definition at line 110 of file quat.h.
|
|
Definition at line 545 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 117 of file quat.h.
00117 {return *this; } |
|
return the norm of the 4D vector.
Definition at line 112 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 108 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 116 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 113 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 109 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 115 of file quat.h.
|
|
return the norm of the 4D vector.
Definition at line 111 of file quat.h.
|
|
Definition at line 544 of file quat.h. References NLMISC::CQuatT< T >::w, w, NLMISC::CQuatT< T >::x, x, NLMISC::CQuatT< T >::y, y, NLMISC::CQuatT< T >::z, and z.
|
|
ctor of a UNIT quaternion, from an angle axis.
Definition at line 530 of file quat.h. References NLMISC::CQuatT< T >::w, w, NLMISC::CQuatT< T >::x, x, NLMISC::CQuatT< T >::y, y, NLMISC::CQuatT< T >::z, and z.
|
|
Definition at line 100 of file quat.h.
|
|
serial.
Definition at line 168 of file quat.h.
|
|
Definition at line 95 of file quat.h.
|
|
Build a UNIT quaternion from an AngleAxis.
Definition at line 155 of file quat.h.
00155 {setAngleAxis(angAxis.Axis, angAxis.Angle);} |
|
Build a UNIT quaternion from an AngleAxis.
|
|
Quaternion spherical linear interpolation. when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made. |
|
return the square of the norm of the 4D vector.
Definition at line 119 of file quat.h.
|
|
Quaternion Quadratic spherical linear interpolation. when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made. |
|
Quaternion Quadratic spherical linear interpolation, with multi revision support. |
|
|
|
Definition at line 77 of file quat.h. Referenced by NL3D::CAnimationOptimizer::nearlySameQuaternion(). |
|
|
|
|
|
|