11namespace LinearAlgebra {
54 Quaternion(
float _x,
float _y,
float _z,
float _w);
161 float maxDegreesDelta);
275 float GetLength()
const;
276 float GetLengthSquared()
const;
277 static float GetLengthSquared(
const Quaternion &q);
Definition AngleAxis.h:14
AngleOf< float > Angle
Definition Angle.h:42
Definition AbsoluteEncoder.h:5
A quaternion.
Definition Quaternion.h:18
float x
The x component.
Definition Quaternion.h:22
float y
The y component.
Definition Quaternion.h:26
float w
The w component.
Definition Quaternion.h:34
float z
The z component.
Definition Quaternion.h:30
A quaternion.
Definition Quaternion.h:41
static Quaternion Inverse(Quaternion quaternion)
The inverse of quaterion.
Definition Quaternion.cpp:140
static Quaternion GetRotationAround(Vector3 axis, Quaternion rotation)
Returns the rotation limited around the given axis.
Definition Quaternion.cpp:397
static Quaternion EulerXYZ(float x, float y, float z)
Create a rotation from euler angles.
Definition Quaternion.cpp:353
static void GetSwingTwist(Vector3 axis, Quaternion rotation, Quaternion *swing, Quaternion *twist)
Swing-twist decomposition of a rotation.
Definition Quaternion.cpp:406
static Vector3 ToAngles(const Quaternion &q)
Convert to euler angles.
Definition Quaternion.cpp:77
static Quaternion FromToRotation(Vector3 fromDirection, Vector3 toDirection)
Calculat the rotation from on vector to another.
Definition Quaternion.cpp:201
void Normalize()
Convert to unit quaternion.
Definition Quaternion.cpp:58
~Quaternion()
Quaternion destructor.
Definition Quaternion.cpp:41
Vector3 operator*(const Vector3 &vector) const
Rotate a vector using this quaterion.
void ToAngleAxis(float *angle, Vector3 *axis)
Convert this quaternion to angle/axis representation.
Definition Quaternion.cpp:243
static float GetAngleAround(Vector3 axis, Quaternion rotation)
Returns the angle of around the give axis for a rotation.
Definition Quaternion.cpp:384
static const Quaternion identity
An identity quaternion.
Definition Quaternion.h:68
static Quaternion SlerpUnclamped(const Quaternion &rotation1, const Quaternion &rotation2, float factor)
Unclamped sherical lerp between two rotations.
Definition Quaternion.cpp:261
static Quaternion Euler(Vector3 eulerAngles)
Create a rotation from a vector containing euler angles.
static Quaternion LookRotation(const Vector3 &forward, const Vector3 &upwards)
A rotation which looks in the given direction.
static Quaternion EulerXYZ(Vector3 eulerAngles)
Create a rotation from a vector containing euler angles.
Quaternion()
Create a new identity quaternion.
Definition Quaternion.cpp:20
static Quaternion Slerp(const Quaternion &rotation1, const Quaternion &rotation2, float factor)
Sherical lerp between two rotations.
Definition Quaternion.cpp:312
Quaternion operator*(const Quaternion &rotation) const
Multiply this quaternion with another quaternion.
bool operator==(const Quaternion &quaternion)
Check the equality of two quaternions.
Definition Quaternion.cpp:136
static float Dot(Quaternion rotation1, Quaternion rotation2)
Calculate the dot product of two quaternions.
Definition Quaternion.cpp:73
static Quaternion Euler(float x, float y, float z)
Create a rotation from euler angles.
Definition Quaternion.cpp:321
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:210
A 3-dimensional vector.
Definition Vector3.h:42