Public Methods |
NVSG_API | Quatf (void) |
| Default constructor. More...
|
NVSG_API | Quatf (const Vec4f &v) |
| Constructor using a Vec4f. More...
|
NVSG_API | Quatf (float f0, float f1, float f2, float f3) |
| Constructor using four floats. More...
|
NVSG_API | Quatf (const Vec3f &axis, float angle) |
| Constructor using an axis and an angle. More...
|
NVSG_API | Quatf (const Vec3f &vec0, const Vec3f &vec1) |
| Constructor by two vectors. More...
|
NVSG_API float & | operator[] (size_t i) |
| Non-constant subscript operator. More...
|
NVSG_API const float & | operator[] (size_t i) const |
| Constant subscript operator. More...
|
NVSG_API Quatf & | operator= (const Quatf &q) |
| Assignment operator. More...
|
NVSG_API bool | operator== (const Quatf &q) const |
| Equality operator. More...
|
NVSG_API bool | operator!= (const Quatf &q) const |
| Inequality operator. More...
|
NVSG_API Quatf & | operator+= (const Quatf &q) |
| Quaternion addition and assignment operator. More...
|
NVSG_API Quatf & | operator-= (const Quatf &q) |
| Quaternion subtraction and assignment operator. More...
|
NVSG_API Quatf | operator- (const Quatf &q) const |
| Quaternion subtraction operator. More...
|
NVSG_API Quatf | operator- (void) const |
| Negation operator. More...
|
NVSG_API Quatf & | operator *= (float f) |
| Quaternion multiplication with a scalar and assignment operator. More...
|
NVSG_API Quatf | operator * (float f) const |
| Quaternion multiplication with a scalar operator. More...
|
NVSG_API Quatf & | operator *= (const Quatf &q) |
| Quaternion multiplication with a quaternion (i.e. concatenation) and assignment operator. More...
|
NVSG_API Quatf | operator * (const Quatf &q) const |
| Quaternion multiplication with a quaternion (i.e. concatenation) operator. More...
|
NVSG_API Quatf & | operator/= (float f) |
| Quaternion division by a scalar and assignment operator. More...
|
NVSG_API Quatf | operator/ (float f) const |
| Quaternion division by a scalar operator. More...
|
NVSG_API Quatf & | operator/= (const Quatf &q) |
| Quaternion division by a quaternion and assignment operator. More...
|
NVSG_API Quatf | operator/ (const Quatf &q) const |
| Quaternion division by a quaternion operator. More...
|
NVSG_API Quatf | operator~ (void) const |
| Quaternion conjugation operator. More...
|
NVSG_API void | invert (void) |
| Invert the quaternion. More...
|
NVSG_API Quatf & | normalize (void) |
| Normalize the quaternion. More...
|
Related Functions |
(Note that these are not member functions.)
|
void | decompose (const Quatf &q, Vec3f &axis, float &angle) |
float | distance (const Quatf &q0, const Quatf &q1) |
float | magnitude (const Quatf &q) |
bool | isNormalized (const Quatf &q) |
bool | isNull (const Quatf &q) |
Quatf | operator * (float f, const Quatf &q) |
Vec3f | operator * (const Quatf &q, const Vec3f &v) |
template<> NVSG_API Quatf | lerp (float alpha, const Quatf &q0, const Quatf &q1) |
Quaternions add a fourth element to the [x,y,z] values that define a three-component vector. Quaternions are an alternative to the matrix methods that are typically used for 3-D rotations. A quaternion represents an axis in 3-D space and a rotation around that axis. For example, a quaternion might represent a (1,1,2) axis and a rotation of 1 radian.