51 Quaternion(
float _x,
float _y,
float _z,
float _w);
156 float maxDegreesDelta);
274 float GetLength()
const;
275 float GetLengthSquared()
const;
276 static float GetLengthSquared(
const Quaternion& q);
A quaternion.
Definition Quaternion.h:15
float x
The x component.
Definition Quaternion.h:19
float z
The z component.
Definition Quaternion.h:27
float y
The y component.
Definition Quaternion.h:23
float w
The w component.
Definition Quaternion.h:31
A quaternion.
Definition Quaternion.h:38
static Quaternion Inverse(Quaternion quaternion)
The inverse of quaterion.
Definition Quaternion.cpp:134
static Quaternion GetRotationAround(Vector3 axis, Quaternion rotation)
Returns the rotation limited around the given axis.
Definition Quaternion.cpp:393
static Quaternion AngleAxis(float angle, const Vector3 &axis)
Convert an angle/axis representation to a quaternion.
Definition Quaternion.cpp:215
static Quaternion EulerXYZ(float x, float y, float z)
Create a rotation from euler angles.
Definition Quaternion.cpp:349
static void GetSwingTwist(Vector3 axis, Quaternion rotation, Quaternion *swing, Quaternion *twist)
Swing-twist decomposition of a rotation.
Definition Quaternion.cpp:402
static Vector3 ToAngles(const Quaternion &q)
Convert to euler angles.
Definition Quaternion.cpp:79
static Quaternion FromToRotation(Vector3 fromDirection, Vector3 toDirection)
Calculat the rotation from on vector to another.
Definition Quaternion.cpp:195
void Normalize()
Convert to unit quaternion.
Definition Quaternion.cpp:60
~Quaternion()
Definition Quaternion.cpp:41
void ToAngleAxis(float *angle, Vector3 *axis)
Convert this quaternion to angle/axis representation.
Definition Quaternion.cpp:237
static float GetAngleAround(Vector3 axis, Quaternion rotation)
Returns the angle of around the give axis for a rotation.
Definition Quaternion.cpp:380
static const Quaternion identity
An identity quaternion.
Definition Quaternion.h:62
static Quaternion SlerpUnclamped(const Quaternion &rotation1, const Quaternion &rotation2, float factor)
Unclamped sherical lerp between two rotations.
Definition Quaternion.cpp:256
static Quaternion LookRotation(const Vector3 &forward, const Vector3 &upwards)
A rotation which looks in the given direction.
Definition Quaternion.cpp:143
Quaternion()
Create a new identity quaternion.
Definition Quaternion.cpp:20
Vector3 operator*(const Vector3 &vector) const
Rotate a vector using this quaterion.
Definition Quaternion.cpp:107
static Quaternion Slerp(const Quaternion &rotation1, const Quaternion &rotation2, float factor)
Sherical lerp between two rotations.
Definition Quaternion.cpp:307
bool operator==(const Quaternion &quaternion)
Check the equality of two quaternions.
Definition Quaternion.cpp:130
static float Dot(Quaternion rotation1, Quaternion rotation2)
Calculate the dot product of two quaternions.
Definition Quaternion.cpp:75
static Quaternion Euler(float x, float y, float z)
Create a rotation from euler angles.
Definition Quaternion.cpp:317
static Quaternion RotateTowards(const Quaternion &from, const Quaternion &to, float maxDegreesDelta)
Rotate form one orientation to anther with a maximum amount of degrees.
Definition Quaternion.cpp:204
A 3-dimensional vector.
Definition Vector3.h:35