Public Methods |
| Quat () |
| Quat (float x, float y, float z, float w) |
| Quat (const Vec4 &v) |
Vec4 & | asVec4 () |
const Vec4 & | asVec4 () const |
const Vec3 | asVec3 () const |
void | set (const float x, const float y, const float z, const float w) |
void | set (const osg::Vec4 &v) |
float & | operator[] (int i) |
float | operator[] (int i) const |
float & | x () |
float & | y () |
float & | z () |
float & | w () |
float | x () const |
float | y () const |
float | z () const |
float | w () const |
const Quat | operator * (const float rhs) const |
| Multiply by scalar.
|
Quat & | operator *= (const float rhs) |
| Unary multiply by scalar.
|
const Quat | operator * (const Quat &rhs) const |
| Binary multiply.
|
Quat & | operator *= (const Quat &rhs) |
| Unary multiply.
|
const Quat | operator/ (const float &rhs) const |
| Divide by scalar.
|
Quat & | operator/= (const float &rhs) |
| Unary divide by scalar.
|
const Quat | operator/ (const Quat &denom) const |
| Binary divide.
|
Quat & | operator/= (const Quat &denom) |
| Unary divide.
|
const Quat | operator+ (const Quat &rhs) const |
| Binary addition.
|
Quat & | operator+= (const Quat &rhs) |
| Unary addition.
|
const Quat | operator- (const Quat &rhs) const |
| Binary subtraction.
|
Quat & | operator-= (const Quat &rhs) |
| Unary subtraction.
|
const Quat | operator- () const |
| Negation operator- returns the negative of the quaternion.
|
const float | length () const |
| Length of the quaternion = sqrt( vec . vec ).
|
const float | length2 () const |
| Length of the quaternion = vec . vec.
|
const Quat | conj () const |
| Conjugate.
|
const Quat | inverse () const |
| Multiplicative inverse method: q^(-1) = q^*/(q.q^*).
|
void | makeRotate (const float angle, const float x, const float y, const float z) |
void | makeRotate (const float angle, const Vec3 &vec) |
void | makeRotate (float angle1, const Vec3 &axis1, float angle2, const Vec3 &axis2, float angle3, const Vec3 &axis3) |
void | makeRotate (const Vec3 &vec1, const Vec3 &vec2) |
| Make a rotation Quat which will rotate vec1 to vec2.
|
void | getRotate (float &angle, float &x, float &y, float &z) const |
| Return the angle and vector components represented by the quaternion.
|
void | getRotate (float &angle, Vec3 &vec) const |
| Return the angle and vector represented by the quaternion.
|
void | slerp (const float t, const Quat &from, const Quat &to) |
| Spherical Linear Interpolation.
|
void | set (const Matrix &m) |
| Set quaternion to be equivalent to specified matrix.
|
void | get (Matrix &m) const |
| Get the equivalent matrix for this quaternion.
|
Matrix | getMatrix () const |
| Get the equivalent matrix for this quaternion.
|
Public Attributes |
Vec4 | _fv |
Friends |
std::ostream & | operator<< (std::ostream &output, const Quat &vec) |
It can be used to represent an orientation in 3D space.