Inheritance diagram for mini3d::quat4d:
Public Member Functions | |
quat4d () | |
A default constructor. | |
quat4d (const array<double, 4>& src) | |
A copy constructor from base class. | |
quat4d (const quat4d& src) | |
A copy constructor. | |
quat4d (double v[4]) | |
A constructor. | |
quat4d (double s, const vector3d& v) | |
A constructor. | |
quat4d (double vw, double vx, double vy, double vz) | |
A constructor. | |
virtual | ~quat4d () |
A destructor. | |
quat4d | operator* (const quat4d& rhs) const |
Multiply two quaternion and return the product. | |
quat4d | operator/ (const quat4d& rhs) const |
Divide two quaternion and return the result ( will throw divid_by_zero exception if rhs.normal() < EPSILON ). | |
double | w () const |
Get the w component of the quaternion. | |
double | x () const |
Get the x component of the quaternion. | |
double | y () const |
Get the y component of the quaternion. | |
double | z () const |
Get the z component of the quaternion. | |
void | w (double ww) |
Set the w component of the quaternion. | |
void | x (double xx) |
Set the x component of the quaternion. | |
void | y (double yy) |
Set the y component of the quaternion. | |
void | z (double zz) |
Set the z component of the quaternion. | |
double | scalar () const |
Get the scalar component (w). | |
vector3d | vector () const |
Get the vector component (x, y, z). | |
quat4d | conjugate () const |
Get the conjugate. | |
quat4d | inverse () const |
Get the inverse ( will throw divid_by_zero exception if normal < EPSILON ). | |
void | invert () |
Invert itself. | |
void | makeRotate (double rad, const vector3d& v) |
Construct a quaternion which represents the rotation about v in opAngle rad. | |
void | makeRotate (const vector3d& v1, const vector3d& v2) |
Construct a quaternion which represents the rotation from v1 to v2. | |
quat4d& | operator= (const array<double, 4>& src) |
Copy from the base class. | |
quat4d& | slerp (quat4d q1, quat4d q2, double t) |
Spherical linear interpolation between two quaternion. | |
Static Public Attributes | |
static const quat4d | _zero_quat |
Protected Member Functions | |
void | assign (double vw, double vx, double vy, double vz) |
Assignment. |
A quaternion [w x y z] contains
a scalar component w, and
a vector component [x, y, z].
|
A default constructor. The quaternion will set as [0 0 0 0]. |
|
A copy constructor from base class.
|
|
A copy constructor.
|
|
A constructor. The quaternion will set as [v[0] v[1] v[2] v[3]].
|
|
A constructor. The quaternion will set as [vw vx vy vz].
|
|
A constructor. The quaternion will set as [vw vx vy vz].
|
|
A destructor.
|
|
Assignment. The quaternion will set as [vw vx vy vz].
|
|
Get the conjugate.
|
|
Get the inverse ( will throw divid_by_zero exception if normal < EPSILON ).
|
|
Invert itself.
|
|
Construct a quaternion which represents the rotation from v1 to v2.
|
|
Construct a quaternion which represents the rotation about v in opAngle rad.
|
|
Multiply two quaternion and return the product.
|
|
Divide two quaternion and return the result ( will throw divid_by_zero exception if rhs.normal() < EPSILON ).
|
|
Copy from the base class.
|
|
Get the scalar component (w).
|
|
Spherical linear interpolation between two quaternion.
|
|
Get the vector component (x, y, z).
|
|
Set the w component of the quaternion.
|
|
Get the w component of the quaternion.
|
|
Set the x component of the quaternion.
|
|
Get the x component of the quaternion.
|
|
Set the y component of the quaternion.
|
|
Get the y component of the quaternion.
|
|
Set the z component of the quaternion.
|
|
Get the z component of the quaternion.
|
|
|