Class representing an orientation/quaternion for the positional tracking module. More...
Functions | |
Orientation () | |
Default constructor. More... | |
Orientation (const Orientation &orientation) | |
Copy constructor (deep copy). More... | |
Orientation (const float4 &in) | |
Copy constructor (deep copy). More... | |
Orientation (const Rotation &rotation) | |
Constructor from an sl::Rotation. More... | |
Orientation (const Translation &tr1, const Translation &tr2) | |
Constructor from a vector represented by two sl::Translation. More... | |
float | operator() (int x) |
Gets the value at specific position in the sl::Orientation. More... | |
Orientation | operator* (const Orientation &orientation) const |
Multiplication operator by an sl::Orientation. More... | |
void | setRotationMatrix (const Rotation &rotation) |
Sets the sl::Orientation from an sl::Rotation. More... | |
Rotation | getRotationMatrix () const |
Returns the current sl::Orientation as an sl::Rotation. More... | |
void | setIdentity () |
Sets the current sl::Orientation to identity. More... | |
void | setZeros () |
Fills the current sl::Orientation with zeros. More... | |
void | normalise () |
Normalizes the current sl::Orientation. More... | |
_FCT_CPU_GPU_ int | size () const |
Return the size of the sl::Vector4. More... | |
_FCT_CPU_GPU_ const float * | ptr () const |
Returns a pointer of the first component. More... | |
_FCT_CPU_GPU_ Vector4< float > & | setValues (const float *b) |
Sets the components of the sl::Vector1 to the values of the argument. More... | |
_FCT_CPU_GPU_ float & | operator[] (const unsigned int i) |
Returns the i-th component. More... | |
_FCT_CPU_GPU_ const float & | operator[] (const unsigned int i) const |
Returns the i-th component. More... | |
_FCT_CPU_GPU_ void | operator[] (const unsigned int i) &&=delete |
Prevent operator from being called by temporaries (such as rvalue) More... | |
_FCT_CPU_GPU_ float | norm () |
Returns the norm of the sl::Vector4. More... | |
_FCT_CPU_GPU_ float | square () |
Returns the squared norm of the sl::Vector4. More... | |
_FCT_CPU_GPU_ float | sum () |
Returns the sum of the components of the sl::Vector4. More... | |
Static Functions | |
static Orientation | identity () |
Creates an sl::Orientation initialized to identity. More... | |
static Orientation | zeros () |
Creates an sl::Orientation filled with zeros. More... | |
static Orientation | normalise (const Orientation &orient) |
Gets the normalized sl::Orientation of a given sl::Orientation. More... | |
static _FCT_CPU_GPU_ float | dot (const Vector4< float > &a, const Vector4< float > &b) |
Returns the dot product of two sl::Vector4. More... | |
static _FCT_CPU_GPU_ float | distance (const Vector4< float > &a, const Vector4< float > &b) |
Returns the distance between two sl::Vector4. More... | |
Class representing an orientation/quaternion for the positional tracking module.
sl::Orientation is a vector defined as [ox, oy, oz, ow]
.
Orientation | ( | ) |
Default constructor.
Creates an identity orientation.
Orientation | ( | const Orientation & | orientation | ) |
Copy constructor (deep copy).
orientation | : sl::Orientation to copy. |
Orientation | ( | const float4 & | in | ) |
Copy constructor (deep copy).
in | : sl::float4 to copy. |
Orientation | ( | const Rotation & | rotation | ) |
Constructor from an sl::Rotation.
It converts the sl::Rotation representation to the sl::Orientation one.
rotation | : sl::Rotation to be used. |
Orientation | ( | const Translation & | tr1, |
const Translation & | tr2 | ||
) |
Constructor from a vector represented by two sl::Translation.
tr1 | : First point of the vector. |
tr2 | : Second point of the vector. |
float operator() | ( | int | x | ) |
Gets the value at specific position in the sl::Orientation.
x | : Position of the value. |
Orientation operator* | ( | const Orientation & | orientation | ) | const |
Multiplication operator by an sl::Orientation.
orientation | : sl.Orientation to multiply the current one with. |
void setRotationMatrix | ( | const Rotation & | rotation | ) |
Sets the sl::Orientation from an sl::Rotation.
rotation | : sl::Rotation to be used. |
Rotation getRotationMatrix | ( | ) | const |
Returns the current sl::Orientation as an sl::Rotation.
void setIdentity | ( | ) |
Sets the current sl::Orientation to identity.
|
static |
Creates an sl::Orientation initialized to identity.
void setZeros | ( | ) |
Fills the current sl::Orientation with zeros.
|
static |
Creates an sl::Orientation filled with zeros.
void normalise | ( | ) |
Normalizes the current sl::Orientation.
|
static |
Gets the normalized sl::Orientation of a given sl::Orientation.
orient | : sl::Orientation to be get the normalized orientation from. |
|
inlineinherited |
Return the size of the sl::Vector4.
|
inlineinherited |
Returns a pointer of the first component.
|
inlineinherited |
Sets the components of the sl::Vector1 to the values of the argument.
|
inlineinherited |
Returns the i-th component.
|
inlineinherited |
Returns the i-th component.
|
deleteinherited |
Prevent operator from being called by temporaries (such as rvalue)
|
inlineinherited |
Returns the norm of the sl::Vector4.
|
inlineinherited |
Returns the squared norm of the sl::Vector4.
|
inlineinherited |
Returns the sum of the components of the sl::Vector4.
|
inlinestaticinherited |
Returns the dot product of two sl::Vector4.
|
inlinestaticinherited |
Returns the distance between two sl::Vector4.