#include <quaterni.h>
Inheritance diagram for csQuaternion:

Public Methods | |
| void | Init (float theR, float theX, float theY, float theZ) |
| Initialize a quaternion with specific values. | |
| csQuaternion () | |
| Construct a 0,0,0,0 quaternion. | |
| csQuaternion (float theR, float theX=0.0, float theY=0.0, float theZ=0.0) | |
| Construct a quaternion with the given parameters. | |
| csQuaternion (const csQuaternion &q) | |
| Copy constructor. | |
| csQuaternion (const csVector3 &q) | |
| Construct quaternion from a vector. | |
| csQuaternion& | operator *= (const csQuaternion &q2) |
| void | Conjugate () |
| void | Negate () |
| Negate all parameters of the quaternion. | |
| void | PrepRotation (float angle, csVector3 vec) |
| Prepare a rotation quaternion, we do a rotation around vec by an angle of "angle". More... | |
| csVector3 | Rotate (csVector3 vec) |
| rotated = q * vec * qConj. | |
| void | Normalize () |
| Normalize this quaternion. | |
| void | SetWithEuler (const csVector3 &rot) |
| Convert a set of Euler angles to a Quaternion Takes a (X,Y,Z) rather than Yaw-Pitch-Roll (Y,X,Z) The output is NOT Normalized, if you wish to do so, normalize it yourself. | |
| csQuaternion | ToAxisAngle () const |
| Return an Axis Angle representation of this Quaternion. | |
| csQuaternion | Slerp (const csQuaternion &quat2, float slerp) const |
| Spherical Linear Interpolation between two quaternions Calculated between this class & the second quaternion by the slerp factor and returned as a new quaternion. | |
Public Attributes | |
| float | r |
| float | x |
| float | y |
| float | z |
Friends | |
| class | operator+ |
| class | operator- |
| class | operator * |
|
|
Prepare a rotation quaternion, we do a rotation around vec by an angle of "angle". Note that vec needs to be a normalized vector ( we don't check this ). |