Urho3D
|
Rotation represented as a four-dimensional normalized vector. More...
#include <Quaternion.h>
Public Member Functions | |
Quaternion () | |
Construct identity quaternion. | |
Quaternion (const Quaternion &quat) | |
Copy-construct from another quaternion. | |
Quaternion (float w, float x, float y, float z) | |
Construct from values. | |
Quaternion (const float *data) | |
Construct from a float array. | |
Quaternion (float angle, const Vector3 &axis) | |
Construct from an angle (in degrees) and axis. | |
Quaternion (float x, float y, float z) | |
Construct from Euler angles (in degrees.) | |
Quaternion (const Vector3 &start, const Vector3 &end) | |
Construct from the rotation difference between two vectors. | |
Quaternion (const Vector3 &xAxis, const Vector3 &yAxis, const Vector3 &zAxis) | |
Construct from orthonormal axes. | |
Quaternion (const Matrix3 &matrix) | |
Construct from a rotation matrix. | |
Quaternion & | operator= (const Quaternion &rhs) |
Assign from another quaternion. | |
Quaternion & | operator+= (const Quaternion &rhs) |
Add-assign a quaternion. | |
Quaternion & | operator*= (float rhs) |
Multiply-assign a scalar. | |
bool | operator== (const Quaternion &rhs) const |
Test for equality with another quaternion without epsilon. | |
bool | operator!= (const Quaternion &rhs) const |
Test for inequality with another quaternion without epsilon. | |
Quaternion | operator* (float rhs) const |
Multiply with a scalar. | |
Quaternion | operator- () const |
Return negation. | |
Quaternion | operator+ (const Quaternion &rhs) const |
Add a quaternion. | |
Quaternion | operator- (const Quaternion &rhs) const |
Subtract a quaternion. | |
Quaternion | operator* (const Quaternion &rhs) const |
Multiply a quaternion. | |
Vector3 | operator* (const Vector3 &rhs) const |
Multiply a Vector3. | |
void | FromAngleAxis (float angle, const Vector3 &axis) |
Define from an angle (in degrees) and axis. | |
void | FromEulerAngles (float x, float y, float z) |
Define from Euler angles (in degrees.) | |
void | FromRotationTo (const Vector3 &start, const Vector3 &end) |
Define from the rotation difference between two vectors. | |
void | FromAxes (const Vector3 &xAxis, const Vector3 &yAxis, const Vector3 &zAxis) |
Define from orthonormal axes. | |
void | FromRotationMatrix (const Matrix3 &matrix) |
Define from a rotation matrix. | |
float | Normalize () |
Normalize to unit length and return the previous length. | |
Quaternion | Normalized () const |
Return normalized to unit length. | |
Quaternion | Inverse () const |
Return inverse. | |
float | LengthSquared () const |
Return squared length. | |
float | DotProduct (const Quaternion &rhs) const |
Calculate dot product. | |
bool | Equals (const Quaternion &rhs) const |
Test for equality with another quaternion with epsilon. | |
Quaternion | Conjugate () const |
Return conjugate. | |
Vector3 | EulerAngles () const |
Return Euler angles in degrees. | |
float | YawAngle () const |
Return yaw angle in degrees. | |
float | PitchAngle () const |
Return pitch angle in degrees. | |
float | RollAngle () const |
Return roll angle in degrees. | |
Matrix3 | RotationMatrix () const |
Return the rotation matrix that corresponds to this quaternion. | |
Quaternion | Slerp (Quaternion rhs, float t) const |
Spherical interpolation with another quaternion. | |
const float * | Data () const |
Return float data. | |
String | ToString () const |
Return as string. |
Public Attributes | |
float | w_ |
W coordinate. | |
float | x_ |
X coordinate. | |
float | y_ |
Y coordinate. | |
float | z_ |
Z coordinate. |
Static Public Attributes | |
static const Quaternion | IDENTITY |
Identity quaternion. |
Rotation represented as a four-dimensional normalized vector.