class methods
- ofQuaternion()
- asVec3()
- asVec4()
- conj()
- get()
- getEuler()
- getRotate()
- inverse()
- length()
- length2()
- makeRotate()
- makeRotate_original()
- normalize()
- operator!=()
- operator*()
- operator*=()
- operator+()
- operator+=()
- operator-()
- operator-=()
- operator/()
- operator/=()
- operator=()
- operator==()
- operator[]()
- set()
- slerp()
- w()
- x()
- y()
- z()
- zeroRotation()
variables
ofQuaternion(...)
ofQuaternion::ofQuaternion(float angle1, const ofVec3f &axis1, float angle2, const ofVec3f &axis2, float angle3, const ofVec3f &axis3)
getEuler()
ofVec3f ofQuaternion::getEuler()
Documentation from code comments
Calculate and return the rotation as euler angles
getRotate(...)
void ofQuaternion::getRotate(float &angle, float &x, float &y, float &z)
Documentation from code comments
Return the angle and vector components represented by the quaternion.
inverse()
const ofQuaternion ofQuaternion::inverse()
Documentation from code comments
Multiplicative inverse method
q^(-1) = q^*/(q.q^*)
length()
float ofQuaternion::length()
Documentation from code comments
Length of the quaternion = sqrt(vec . vec)
length2()
float ofQuaternion::length2()
Documentation from code comments
Length of the quaternion = vec . vec
makeRotate(...)
void ofQuaternion::makeRotate(const ofVec3f &vec1, const ofVec3f &vec2)
Documentation from code comments
Make a rotation Quat which will rotate vec1 to vec2. Generally take a dot product to get the angle between these and then use a cross product to get the rotation axis Watch out for the two special cases when the vectors are co-incident or opposite in direction.
makeRotate(...)
void ofQuaternion::makeRotate(float angle, float x, float y, float z)
Documentation from code comments
\briefSet a quaternion which will perform a rotation of an angle around the axis given by the vector(x,y,z).
Define Spherical Linear interpolation method also
makeRotate(...)
void ofQuaternion::makeRotate(float angle1, const ofVec3f &axis1, float angle2, const ofVec3f &axis2, float angle3, const ofVec3f &axis3)
makeRotate_original(...)
void ofQuaternion::makeRotate_original(const ofVec3f &vec1, const ofVec3f &vec2)
operator=(...)
ofQuaternion & ofQuaternion::operator=(const ofQuaternion &q)
Documentation from code comments
\name Operators {
operator[](...)
float & ofQuaternion::operator[](int i)
Documentation from code comments
\name Getters {
set(...)
void ofQuaternion::set(float x, float y, float z, float w)
Documentation from code comments
\name Setters {
slerp(...)
void ofQuaternion::slerp(float t, const ofQuaternion &from, const ofQuaternion &to)
Documentation from code comments
Spherical Linear Interpolation.
As t goes from 0 to 1, the Quat object goes from "from" to "to".
zeroRotation()
bool ofQuaternion::zeroRotation()
Documentation from code comments
return true if the Quat represents a zero rotation, and therefore can be ignored in computations.
Last updated Tuesday, 19 November 2024 17:25:36 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue