#include <irtkQuaternion.h>


Definition at line 21 of file irtkQuaternion.h.
Public Member Functions | |
| irtkQuaternion () | |
| Default constructor creates a quaternion with components (0, 0, 0, 0). | |
| irtkQuaternion (double t, double u, double v, double w) | |
| Constructor creates a quaternion with components (t, u, v, w). | |
| irtkQuaternion (const irtkQuaternion &q) | |
| Copy constructor. | |
| irtkQuaternion & | operator= (const irtkQuaternion &q) |
| Assignment operator. | |
| irtkQuaternion | Conjugate () const |
| Returns the conjugate of a quaternion. | |
| irtkQuaternion | Inverse () const |
| Returns the inverse of the quaternion. | |
| void | Normalize () |
| Normalizes the quaternion. | |
| double | Length () const |
| Returns the length of the quaternion. | |
| irtkMatrix | ComputeRotationMatrix () const |
| Computes the rotation matrix corresponding to this quaternion. | |
| virtual const char * | NameOfClass () |
| Returns the name of the class. | |
Static Public Member Functions | |
| static irtkMatrix | ComputeTransformationMatrix (double alpha, double u, double v, double w, double ox, double oy, double oz) |
| Computes the rotation matrix needed to a rotate a point by an angle alpha about the axis with direction (u, v, w) passing through the point (ox, oy, oz). | |
| static irtkMatrix | ComputeRotationMatrix (double alpha, double u, double v, double w) |
| Computes the rotation matrix needed to rotate a point by an angle alpha about the axis with direction (u, v, w) passing through the origin. | |
| static irtkQuaternion | ComputeRotationQuaternion (double alpha, double u, double v, double w) |
| Computes the quaternion which represents a rotation by an angle alpha about the axis with direction (u, v, w) passing through the origin. | |
Public Attributes | |
| double | _t |
| The real part of the quaternion. | |
| double | _u |
| The first imaginary part. | |
| double | _v |
| The second imaginary part. | |
| double | _w |
| The third imaginary part. | |
Friends | |
| irtkQuaternion | operator+ (const irtkQuaternion &a, const irtkQuaternion &b) |
| Adds two quaternions. | |
| irtkQuaternion | operator- (const irtkQuaternion &a, const irtkQuaternion &b) |
| Subtracts two quaternions. | |
| irtkQuaternion | operator * (const irtkQuaternion &a, const irtkQuaternion &b) |
| Multiplies two quaternions. | |
| irtkQuaternion | operator * (const irtkQuaternion &a, double b) |
| Multiplies a quaternion by a real number. | |
| ostream & | operator<< (ostream &os, const irtkQuaternion &q) |
| Outputs the quaternion. | |
| irtkQuaternion::irtkQuaternion | ( | ) | [inline] |
| irtkQuaternion::irtkQuaternion | ( | double | t, | |
| double | u, | |||
| double | v, | |||
| double | w | |||
| ) | [inline] |
| irtkQuaternion::irtkQuaternion | ( | const irtkQuaternion & | q | ) | [inline] |
| irtkQuaternion & irtkQuaternion::operator= | ( | const irtkQuaternion & | q | ) | [inline] |
| irtkQuaternion irtkQuaternion::Conjugate | ( | ) | const [inline] |
| irtkQuaternion irtkQuaternion::Inverse | ( | ) | const [inline] |
Returns the inverse of the quaternion.
Definition at line 208 of file irtkQuaternion.h.
References Conjugate(), and Length().
| void irtkQuaternion::Normalize | ( | ) | [inline] |
| double irtkQuaternion::Length | ( | ) | const [inline] |
Returns the length of the quaternion.
Definition at line 230 of file irtkQuaternion.h.
References _t, _u, _v, and _w.
Referenced by Inverse(), and Normalize().
| irtkMatrix irtkQuaternion::ComputeRotationMatrix | ( | ) | const |
Computes the rotation matrix corresponding to this quaternion.
Note that the matrix is a 4x4 homogeneous matrix.
| static irtkMatrix irtkQuaternion::ComputeTransformationMatrix | ( | double | alpha, | |
| double | u, | |||
| double | v, | |||
| double | w, | |||
| double | ox, | |||
| double | oy, | |||
| double | oz | |||
| ) | [static] |
Computes the rotation matrix needed to a rotate a point by an angle alpha about the axis with direction (u, v, w) passing through the point (ox, oy, oz).
The direction of rotation is the direction a right-handed corkscrew needs to be rotated in order to move along the direction of the axis. Note that the matrix returned is a 4x4 homogeneous matrix.
| static irtkMatrix irtkQuaternion::ComputeRotationMatrix | ( | double | alpha, | |
| double | u, | |||
| double | v, | |||
| double | w | |||
| ) | [static] |
Computes the rotation matrix needed to rotate a point by an angle alpha about the axis with direction (u, v, w) passing through the origin.
Direction of rotation is direction a right-handed corkscrew needs to be rotated in order to move along direction of axis. Note that the rotation matrix is a 4x4 homogeneous matrix.
| static irtkQuaternion irtkQuaternion::ComputeRotationQuaternion | ( | double | alpha, | |
| double | u, | |||
| double | v, | |||
| double | w | |||
| ) | [static] |
Computes the quaternion which represents a rotation by an angle alpha about the axis with direction (u, v, w) passing through the origin.
Direction of rotation is direction a right-handed corkscrew needs to be rotated in order to move along direction of axis.
| const char * irtkQuaternion::NameOfClass | ( | ) | [inline, virtual] |
| irtkQuaternion operator+ | ( | const irtkQuaternion & | a, | |
| const irtkQuaternion & | b | |||
| ) | [friend] |
| irtkQuaternion operator- | ( | const irtkQuaternion & | a, | |
| const irtkQuaternion & | b | |||
| ) | [friend] |
| irtkQuaternion operator * | ( | const irtkQuaternion & | a, | |
| const irtkQuaternion & | b | |||
| ) | [friend] |
| irtkQuaternion operator * | ( | const irtkQuaternion & | a, | |
| double | b | |||
| ) | [friend] |
| ostream& operator<< | ( | ostream & | os, | |
| const irtkQuaternion & | q | |||
| ) | [friend] |
| double irtkQuaternion::_t |
The real part of the quaternion.
Definition at line 25 of file irtkQuaternion.h.
Referenced by Conjugate(), irtkQuaternion(), Length(), Normalize(), and operator=().
| double irtkQuaternion::_u |
The first imaginary part.
Definition at line 28 of file irtkQuaternion.h.
Referenced by Conjugate(), irtkQuaternion(), Length(), Normalize(), and operator=().
| double irtkQuaternion::_v |
The second imaginary part.
Definition at line 31 of file irtkQuaternion.h.
Referenced by Conjugate(), irtkQuaternion(), Length(), Normalize(), and operator=().
| double irtkQuaternion::_w |
The third imaginary part.
Definition at line 34 of file irtkQuaternion.h.
Referenced by Conjugate(), irtkQuaternion(), Length(), Normalize(), and operator=().