Orientation Class Reference

Designed to contain orientation (quaternion) data of the positional tracking. More...

Functions

 Orientation ()
 empty Orientation default constructor. More...
 
 Orientation (const Orientation &orientation)
 Orientation copy constructor (deep copy). More...
 
 Orientation (const float4 &in)
 Orientation copy constructor (deep copy). More...
 
 Orientation (const Rotation &rotation)
 Orientation constructor from an Rotation. More...
 
 Orientation (const Translation &tr1, const Translation &tr2)
 Orientation constructor from a vector represented by two Translation. More...
 
float operator() (int x)
 Returns the value at specific position in the Orientation. More...
 
Orientation operator* (const Orientation &orientation) const
 Multiplication operator by an Orientation. More...
 
void setRotationMatrix (const Rotation &rotation)
 Sets the orientation from a Rotation. More...
 
Rotation getRotationMatrix () const
 Returns the current orientation as a Rotation. More...
 
void setIdentity ()
 Sets the current Orientation to identity. More...
 
void setZeros ()
 Fills the current Orientation with zeros. More...
 
void normalise ()
 Normalizes the current Orientation. More...
 
_FCT_CPU_GPU_ int size () const
 
_FCT_CPU_GPU_ const float * ptr () const
 
_FCT_CPU_GPU_ Vector4< float > & setValues (const float *b)
 
_FCT_CPU_GPU_ float & operator[] (int i)
 
_FCT_CPU_GPU_ const float & operator[] (int i) const
 
_FCT_CPU_GPU_ float norm ()
 returns the norm of the vector More...
 
_FCT_CPU_GPU_ float square ()
 returns the squared norm of the vector More...
 
_FCT_CPU_GPU_ float sum ()
 returns the sum of the vector More...
 

Static Functions

static Orientation identity ()
 Creates an Orientation initialized to identity. More...
 
static Orientation zeros ()
 Creates an Orientation filled with zeros. More...
 
static Orientation normalise (const Orientation &orient)
 Creates the normalized version of an existing Orientation. More...
 
static _FCT_CPU_GPU_ float dot (const Vector4< float > &a, const Vector4< float > &b)
 returns the dot product of two vector More...
 
static _FCT_CPU_GPU_ float distance (const Vector4< float > &a, const Vector4< float > &b)
 returns the distance between two vector More...
 

Detailed Description

Designed to contain orientation (quaternion) data of the positional tracking.

Orientation is a vector defined as [ox, oy, oz, ow].

Constructor and Destructor

◆ Orientation() [1/5]

empty Orientation default constructor.

◆ Orientation() [2/5]

Orientation ( const Orientation orientation)

Orientation copy constructor (deep copy).

Parameters
orientation: the Orientation to copy.

◆ Orientation() [3/5]

Orientation ( const float4 in)

Orientation copy constructor (deep copy).

Parameters
in: the vector to copy.

Set in the following order : [ox, oy, oz, ow].

◆ Orientation() [4/5]

Orientation ( const Rotation rotation)

Orientation constructor from an Rotation.

It converts the Rotation representation to the Orientation one.

Parameters
rotation: the Rotation to be used.

◆ Orientation() [5/5]

Orientation ( const Translation tr1,
const Translation tr2 
)

Orientation constructor from a vector represented by two Translation.

Parameters
tr1: the first point of the vector.
tr2: the second point of the vector.

Functions

◆ operator()()

float operator() ( int  x)

Returns the value at specific position in the Orientation.

Parameters
x: the position of the value
Returns
The value at the x position.

◆ operator*()

Orientation operator* ( const Orientation orientation) const

Multiplication operator by an Orientation.

Parameters
orientation: the orientation.
Returns
The current orientation after being multiplied by the other orientation.

◆ setRotationMatrix()

void setRotationMatrix ( const Rotation rotation)

Sets the orientation from a Rotation.

Parameters
rotation: the Rotation to be used.

◆ getRotationMatrix()

Rotation getRotationMatrix ( ) const

Returns the current orientation as a Rotation.

Returns
The rotation computed from the orientation data.

◆ setIdentity()

void setIdentity ( )

Sets the current Orientation to identity.

◆ identity()

static Orientation identity ( )
static

Creates an Orientation initialized to identity.

Returns
An identity Orientation.

◆ setZeros()

void setZeros ( )

Fills the current Orientation with zeros.

◆ zeros()

static Orientation zeros ( )
static

Creates an Orientation filled with zeros.

Returns
An Orientation filled with zeros.

◆ normalise() [1/2]

void normalise ( )

Normalizes the current Orientation.

◆ normalise() [2/2]

static Orientation normalise ( const Orientation orient)
static

Creates the normalized version of an existing Orientation.

Parameters
orient: the Orientation to be used.
Returns
The normalized version of the Orientation.

◆ size()

_FCT_CPU_GPU_ int size ( ) const
inlineinherited

◆ ptr()

_FCT_CPU_GPU_ const float * ptr ( ) const
inlineinherited

◆ setValues()

_FCT_CPU_GPU_ Vector4<float >& setValues ( const float *  b)
inlineinherited

◆ operator[]() [1/2]

_FCT_CPU_GPU_ float & operator[] ( int  i)
inlineinherited

◆ operator[]() [2/2]

_FCT_CPU_GPU_ const float & operator[] ( int  i) const
inlineinherited

◆ norm()

_FCT_CPU_GPU_ float norm ( )
inlineinherited

returns the norm of the vector

◆ square()

_FCT_CPU_GPU_ float square ( )
inlineinherited

returns the squared norm of the vector

◆ sum()

_FCT_CPU_GPU_ float sum ( )
inlineinherited

returns the sum of the vector

◆ dot()

static _FCT_CPU_GPU_ float dot ( const Vector4< float > &  a,
const Vector4< float > &  b 
)
inlinestaticinherited

returns the dot product of two vector

◆ distance()

static _FCT_CPU_GPU_ float distance ( const Vector4< float > &  a,
const Vector4< float > &  b 
)
inlinestaticinherited

returns the distance between two vector