Hermes
|
Quaternion representation v.x i + v.y j + v.z k + r. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | Quaternion () |
Default constructor. | |
HERMES_DEVICE_CALLABLE | Quaternion (T x, T y, T z, T w) |
Construct from component values. More... | |
HERMES_DEVICE_CALLABLE | Quaternion (const hermes::Vector3< T > &v, T r=0) |
Construct from part values. More... | |
HERMES_DEVICE_CALLABLE const T & | operator[] (int i) const |
Get i-th component. More... | |
HERMES_DEVICE_CALLABLE T & | operator[] (int i) |
Get i-th component reference. More... | |
HERMES_DEVICE_CALLABLE Matrix4x4< T > | matrix () const |
HERMES_DEVICE_CALLABLE Quaternion | inverse () const |
Computes inverse of this quaternion. More... | |
HERMES_DEVICE_CALLABLE Quaternion | conjugate () const |
Computes conjugate of this quaternion. More... | |
HERMES_DEVICE_CALLABLE T | length2 () const |
Computes the squared norm. More... | |
HERMES_DEVICE_CALLABLE T | length () const |
Computes the norm. More... | |
HERMES_DEVICE_CALLABLE Quaternion | normalized () const |
Computes normalized copy. More... | |
Static Public Member Functions | |
static HERMES_DEVICE_CALLABLE Quaternion< T > | I () |
Creates an identity quaternion (0,0,0,1) More... | |
Public Attributes | |
hermes::Vector3< T > | v |
vector part | |
T | r {0} |
scalar part | |
Quaternion representation v.x i + v.y j + v.z k + r.
T | data type |
|
inline |
Construct from component values.
x | |
y | |
z | |
w |
|
inline |
Construct from part values.
v | vector part |
r | scalar part |
|
inline |
Computes conjugate of this quaternion.
|
inlinestatic |
Creates an identity quaternion (0,0,0,1)
|
inline |
Computes inverse of this quaternion.
|
inline |
Computes the norm.
|
inline |
Computes the squared norm.
|
inline |
|
inline |
Computes normalized copy.
|
inline |
Get i-th component reference.
i
is not checked i | component index in [0, 1] |
|
inline |
Get i-th component.
i
is not checked i | component index in [0, 1] |