|
Nebula
|
#include <quat.h>
A quaternion is usually used to represent an orientation in 3D space.
Inherited by Game::Orientation.
Public Member Functions | |
| quat () | |
| default constructor | |
| quat (quat const &)=default | |
| default copy constructor | |
| quat (scalar x, scalar y, scalar z, scalar w) | |
| construct from components | |
| quat (const vec4 &rhs) | |
| construct from vec4 | |
| quat (const __m128 &rhs) | |
| construct from __m128 | |
| void | operator= (const __m128 &rhs) |
| assign __m128 | |
| bool | operator== (const quat &rhs) const |
| equality operator | |
| bool | operator!= (const quat &rhs) const |
| inequality operator | |
| void | load (const scalar *ptr) |
| load content from 16-byte-aligned memory | |
| void | loadu (const scalar *ptr) |
| load content from unaligned memory | |
| void | store (scalar *ptr) const |
| write content to 16-byte-aligned memory through the write cache | |
| void | storeu (scalar *ptr) const |
| write content to unaligned memory through the write cache | |
| void | stream (scalar *ptr) const |
| stream content to 16-byte-aligned memory circumventing the write-cache | |
| vec3 | x_axis () const |
| get the x axis of the cartesian coordinate system that this quaternion represents | |
| vec3 | y_axis () const |
| get the y axis of the cartesian coordinate system that this quaternion represents | |
| vec3 | z_axis () const |
| get the z axis of the cartesian coordinate system that this quaternion represents | |
| void | set (scalar x, scalar y, scalar z, scalar w) |
| set content | |
| void | set (vec4 const &f4) |
| set from vec4 | |
Public Attributes | ||
| union { | ||
| struct { | ||
| float x | ||
| float y | ||
| float z | ||
| float w | ||
| } | ||
| float v [4] | ||
| __m128 vec | ||
| }; | ||
Friends | |
| struct | mat4 |
| __forceinline Math::quat::quat | ( | ) |
default constructor
|
default |
default copy constructor
| __forceinline Math::quat::quat | ( | const __m128 & | rhs | ) |
construct from __m128
| __forceinline void Math::quat::load | ( | const scalar * | ptr | ) |
load content from 16-byte-aligned memory
Load 4 floats from 16-byte-aligned memory.
| __forceinline void Math::quat::loadu | ( | const scalar * | ptr | ) |
load content from unaligned memory
Load 4 floats from unaligned memory.
| __forceinline bool Math::quat::operator!= | ( | const quat & | rhs | ) | const |
inequality operator
| __forceinline void Math::quat::operator= | ( | const __m128 & | rhs | ) |
assign __m128
| __forceinline bool Math::quat::operator== | ( | const quat & | rhs | ) | const |
equality operator
| __forceinline void Math::quat::store | ( | scalar * | ptr | ) | const |
write content to 16-byte-aligned memory through the write cache
Store to 16-byte-aligned float pointer.
| __forceinline void Math::quat::storeu | ( | scalar * | ptr | ) | const |
write content to unaligned memory through the write cache
Store to non-aligned float pointer.
| __forceinline void Math::quat::stream | ( | scalar * | ptr | ) | const |
stream content to 16-byte-aligned memory circumventing the write-cache
| __forceinline vec3 Math::quat::x_axis | ( | ) | const |
get the x axis of the cartesian coordinate system that this quaternion represents
| __forceinline vec3 Math::quat::y_axis | ( | ) | const |
get the y axis of the cartesian coordinate system that this quaternion represents
| __forceinline vec3 Math::quat::z_axis | ( | ) | const |
get the z axis of the cartesian coordinate system that this quaternion represents
|
friend |
| union { ... } Math::quat |
| float Math::quat::v[4] |
| __m128 Math::quat::vec |
| float Math::quat::w |
| float Math::quat::x |
| float Math::quat::y |
| float Math::quat::z |