|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
QuarternC::QuarternC(void)
QuarternC::QuarternC(const QuarternC &)
QuarternC::operator=(const QuarternC &)
QuarternC::QuarternC(double,double,double,double)
QuarternC::QuarternC(Vector3dC)
QuarternC::QuarternC(Vector3dC,double)
QuarternC::QuarternC(Matrix3d3C,int)
QuarternC::Set(Vector3dC)
QuarternC::Set(Vector3dC,double)
QuarternC::Set(Matrix3d3C,int)
QuarternC::operator[](const int)
QuarternC::operator[](const int) const
QuarternC::MakePositive(void)
QuarternC::Norm(void)
QuarternC::Normalize(void)
QuarternC::Inverse(void) const
QuarternC::Conjugate(void) const
QuarternC::I(void) const
QuarternC::Rotate(Vector3dC) const
QuarternC::ExportAxTheta(void) const
QuarternC::ExportRotAngle(void) const
QuarternC::ExportRotAxis(void) const
QuarternC::ExportQuatMat(void) const
QuarternC::ExportQuatMat2(void) const
QuarternC::ExportRotMat(BooleanT) const
QuarternC::ExportVector(void) const
QuarternC::ExportEuler(void) const
QuarternC::ExportEuler(const JointT &,const BooleanT &) const
QuarternC::DQuatDRotVec(void) const
QuarternC::DRotVecDQuat(void) const
QuarternC::func_alpha(const RealT &,const RealT &) const
QuarternC::func_gamma(const RealT &,const RealT &) const
QuarternC::func_kappa(const RealT &,const RealT &) const
QuarternC::func_lambda(const RealT &,const RealT &) const
QuarternC::func_tau(const RealT &) const
QuarternC::func_ups(const RealT &) const
QuarternC::Dq0q1Dq(const QuarternC &,const int &) const
QuarternC::Dq0q1q2Dq(const QuarternC &,const QuarternC &,const int &) const
QuarternC::KwikPrint(ostream &,int,int) const
QuarternC::Print(void) const
QuarternC::LongPrint(void) const
QuarternC::operator*(const QuarternC,const QuarternC)
QuarternC::operator*(const QuarternC &,const RealT &)
QuarternC::operator+(const QuarternC &,const QuarternC &)
QuarternC::operator-(const QuarternC &,const QuarternC &)
QuarternC::operator<<(ostream &,const QuarternC &)
|
Comments:
This list may be extended in time. Therefore please always use
default in a switch to test for unprocessed option, and not for
any other task.
Variables:
- const double axthetaconv = 1e-8;
-
used in the conversion between axtheta and quartern
when below this bound use shortcut for better accuracy
- const double nearlyzero = 1e-13;
-
used in the orthogonality error check for the constructor from matrix
- const double underflow = 1e-50;
-
angles smaller than this value are assumed zero, used when constructing
from angle and axis.
If the length of the axis is less than this, an error is recorded
Export Angle and Export Axis are also affected.
- const double axthetaconv;
-
used in the conversion between axtheta and quartern
when below this bound use shortcut for better accuracy
- const double nearlyzero;
-
used in the orthogonality error check for the constructor from matrix
- const double underflow;
-
angles smaller than this value are assumed zero, used when constructing
from angle and axis.
If the length of the axis is less than this, an error is recorded
Export Angle and Export Axis are also affected.
Methods:
- QuarternC()
-
Null Constructor, zero rotation, (1,0,0,0)
- QuarternC(const QuarternC & qu)
-
Copy constructor
- QuarternC & operator=(const QuarternC & qu)
-
Assignment
- QuarternC(double q0,double q1,double q2,double q3)
-
Constructor - quarternion is not tested for validity.
- QuarternC(Vector3dC axtheta)
-
Constructor from axis * angle in radians
- QuarternC(Vector3dC axis,double theta)
-
Constructor
If theta != zero then axis must be non zero
the axis vector is normalized inside this routine!
- QuarternC(Matrix3d3C rotate,int check = 1)
-
Constructor
matrix is checked for orthogonality if check!=0
This routine is reliable for small angles!!
NOT ACCURATE FOR ANGLES NEAR PI
General operations
------------------
- void Set(Vector3dC axtheta)
-
Set as specifed
- void Set(Vector3dC axis,double theta)
-
Set as specifed
- void Set(Matrix3d3C rotate,int check = 1)
-
Set as specifed
- double & operator[](const int i)
-
Access to ith element of the quarternion
- const double & operator[](const int i) const
-
Access to ith element of the quarternion
- void MakePositive(void)
-
replace quarternion by one with q[0] positive
which performs the same rotation
- RealT Norm()
-
the norm of the quaternion (quareroot of the sum of the squares of the elements)
- void Normalize(void)
-
impose the condition that norm=1
- QuarternC Inverse() const
-
returns inverse of q, does not change q (Doesn't normalize q; is in fact
the conjugate of q)
- QuarternC Conjugate() const
-
- QuarternC I() const
-
returns inverse of q, does not change q
- Vector3dC Rotate(Vector3dC r) const
-
applies rotation q to r and returns the result
- Vector3dC ExportAxTheta() const
-
return the rotation as a unit vector axis times angle in radians
Note warnings for ExportRotAxis();
- double ExportRotAngle() const
-
return the angle of rotation, which should always be 0-PI
I believe this routine is accurate for theta near 0 and near PI
- Vector3dC ExportRotAxis() const
-
return the rotation as a unit vector axis around which rotated
If Null Rotation return axis as (1,1,1) vector
********** NB ************
For angles very close to PI this routines is not reliable
but it is OK for angles near zero.
If angle==PI the axis is garbage!
- Matrix4d4C ExportQuatMat() const
-
return quaternion as a 4x4 matrix - see Schmitts ECCV 98 paper
- MatrixC ExportQuatMat2() const
-
return quaternion as a MatrixC (4x4) - see Schmitts ECCV 98 paper
- Matrix3d3C ExportRotMat(BooleanT normalize = FALSE) const
-
return rotation as 3x3 rotation matrix
as far as I know always OK
- Vector3dC ExportVector() const
-
returns the 3 vector components as they are, used for rotating vectors
- Vector3dC ExportEuler() const
-
The angles returned correspond to rotations
around static axes XYZ in radians.
- Vector3dC ExportEuler(const JointT & jtype,const BooleanT & premult) const
-
The angles returned correspond to rotations
- MatrixC DQuatDRotVec() const
-
derivative of the quaternion to the rotation vector
- MatrixC DRotVecDQuat() const
-
derivative of the rotation vector to the quaternion
- RealT func_alpha(const RealT & x,const RealT & thres) const
-
- RealT func_gamma(const RealT & x,const RealT & thres) const
-
- RealT func_kappa(const RealT & x,const RealT & thres) const
-
- RealT func_lambda(const RealT & x,const RealT & thres) const
-
- RealT func_tau(const RealT & thres) const
-
- RealT func_ups(const RealT & thres) const
-
functions used in DQuatDRotVec & DRotVecDQuat
- MatrixC Dq0q1Dq(const QuarternC & q,const int & nr) const
-
derivative of the product ('this' * 'q') with respect to 'this' (nr=0)
or 'q' (nr=1)
- MatrixC Dq0q1q2Dq(const QuarternC & q1,const QuarternC & q2,const int & nr) const
-
derivative of the product ('this' * 'q1' * 'q2') with respect to
'this' (nr=0), 'q1' (nr=1) or 'q2' (nr=2)
- void KwikPrint(ostream & outS,int w = 10,int p = 7) const
-
One line printout to specified precision
- void Print() const
-
short print out
- void LongPrint() const
-
detailed print out
- QuarternC operator*(const QuarternC q,const QuarternC p)
-
returns q x p, quarternion multiplication
can return q[0] < 0
- QuarternC operator*(const QuarternC & q1,const RealT & val)
-
returns q[i] = q1[i]*val, for i=0..3
- QuarternC operator+(const QuarternC & q1,const QuarternC & q2)
-
returns q[i] = q1[i] + q2[i], for i=0..3
- QuarternC operator-(const QuarternC & q1,const QuarternC & q2)
-
returns q[i] = q1[i] - q2[i], for i=0..3
- ostream & operator<<(ostream & outS,const QuarternC & quartern)
-
ouput stream operator
|
Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|