HatchitMath
|
Public Member Functions | |
Quaternion (const float rawArray[]) | |
Quaternion (const Vector3 &axis, float angle) | |
Quaternion (float x, float y, float z, float w) | |
Quaternion (float roll, float pitch, float yaw) | |
Quaternion (__m128 quatData) | |
void * | operator new (size_t _size) |
void | operator delete (void *p) |
void * | operator new[] (size_t size) |
void | operator delete[] (void *p) |
bool | operator== (const Quaternion &p_rhs) const |
Compares the values of this Quaternion to another given Quaternion. More... | |
bool | operator!= (const Quaternion &p_rhs) const |
Compares the values of this Quaternion to another given Quaternion. More... | |
Quaternion | operator+ (const Quaternion &p_rhs) const |
Adds the components of this Quaternion to another given Quaternion. More... | |
Quaternion | operator- (const Quaternion &p_rhs) const |
Subtracts the components of this Quaternion with another given Quaternion. More... | |
Quaternion | operator* (const Quaternion &p_rhs) const |
Multiplies the quaternion with another Quaternion using the Hamilton Product. More... | |
Quaternion & | operator+= (const Quaternion &p_rhs) |
Adds the components of the other quaternion into this quaternion. More... | |
Quaternion & | operator-= (const Quaternion &p_rhs) |
Subtracts the components of the other quaternion from this quaternion. More... | |
Quaternion & | operator*= (const Quaternion &p_rhs) |
Multiplies the two given quaternions using the Hamilton Product and stores the results back into the first Quaternion. More... | |
operator __m128 () const | |
Returns copy of internal __m128 structure. More... | |
Float4 | ToFloat4 () const |
Stores values of Quaternion into Float4 type. More... | |
Quaternion () | |
Creates an identity Quaterion with elements 1,0,0,0. | |
Quaternion (float *m_vector) | |
creates a quaternion from a pointer to an array of 4 floats | |
Quaternion (float w, float x, float y, float z) | |
Creates a Quaterion with elements set to the given values. More... | |
Quaternion (Vector3 v) | |
Creates a Quaternion based off the Euler rotation described by a Vector3. More... | |
Quaternion (Vector4 v) | |
Creates a Quaterion based on the Angle-Axis rotation described by a Vector4 where x,y,z is the axis and w is the angle. More... | |
Quaternion | getInverse () |
Returns an Quaterion that is the inverse of this one. More... | |
Vector4 | getAxisAngle () |
Returns this Quaterion's rotation in Angle-Axis form with a Vector4. More... | |
Matrix4 | getRotationMatrix () |
Returns this Quaterion's rotation in Matrix form. More... | |
Quaternion | operator* (Quaternion other) |
Multiplies this quaterion with another and returns the product. More... | |
void | normalize () |
Static Public Member Functions | |
static Quaternion | getQuaternionIdentity () |
Returns an identity Quaterion with the elements 1,0,0,0. More... | |
Public Attributes | |
union { | |
__m128 m_quaternion | |
struct { | |
float x | |
float y | |
float z | |
float w | |
} | |
float m_data [4] | |
}; | |
union { | |
__m128 m_vector | |
struct { | |
float w | |
float x | |
float y | |
float z | |
} | |
float data [4] | |
}; | |
Hatchit::Math::Quaternion::Quaternion | ( | float | w, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Creates a Quaterion with elements set to the given values.
x | The first element |
y | The second element |
z | The third element |
w | The fourth element |
Quaternion::Quaternion | ( | Vector3 | v | ) |
Creates a Quaternion based off the Euler rotation described by a Vector3.
v | The Vector3 used to describe a Euler rotation |
Quaternion::Quaternion | ( | Vector4 | v | ) |
Vector4 Quaternion::getAxisAngle | ( | ) |
Returns this Quaterion's rotation in Angle-Axis form with a Vector4.
Quaternion Quaternion::getInverse | ( | ) |
Returns an Quaterion that is the inverse of this one.
|
static |
Returns an identity Quaterion with the elements 1,0,0,0.
Matrix4 Quaternion::getRotationMatrix | ( | ) |
Returns this Quaterion's rotation in Matrix form.
|
inlineexplicit |
Returns copy of internal __m128 structure.
|
inline |
Compares the values of this Quaternion to another given Quaternion.
p_rhs | The Other Quaternion |
Quaternion Quaternion::operator* | ( | Quaternion | other | ) |
Multiplies this quaterion with another and returns the product.
other | The other quaternion to multiply into this one |
|
inline |
Multiplies the quaternion with another Quaternion using the Hamilton Product.
p_rhs | The other Quaternion |
|
inline |
Multiplies the two given quaternions using the Hamilton Product and stores the results back into the first Quaternion.
p_rhs | The other Quaternion |
|
inline |
Adds the components of this Quaternion to another given Quaternion.
p_rhs | The other Quaternion |
|
inline |
Adds the components of the other quaternion into this quaternion.
p_rhs | The other Quaternion |
|
inline |
Subtracts the components of this Quaternion with another given Quaternion.
p_rhs | The other Quaternion |
|
inline |
Subtracts the components of the other quaternion from this quaternion.
p_rhs | The other Quaternion |
|
inline |
Compares the values of this Quaternion to another given Quaternion.
p_rhs | The other Quaternion |
|
inline |
Stores values of Quaternion into Float4 type.