Orientation Class Reference

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

General 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 setRotation (const Rotation &rotation)
 Sets the orientation from a Rotation. More...
 
Rotation getRotation () 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 T * ptr () const
 
_FCT_CPU_GPU_ Vector4< T > & setValues (const T *b)
 
_FCT_CPU_GPU_ T & operator[] (int i)
 
_FCT_CPU_GPU_ const T & 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< T > &a, const Vector4< T > &b)
 returns the dot product of two vector More...
 
static _FCT_CPU_GPU_ float distance (const Vector4< T > &a, const Vector4< T > &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

empty Orientation default constructor.

Orientation ( const Orientation orientation)

Orientation copy constructor (deep copy).

Parameters
orientation: the Orientation to copy.
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 ( 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 ( 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

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.
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.
void setRotationMatrix ( const Rotation rotation)

Sets the orientation from a Rotation.

Parameters
rotation: the Rotation to be used.
Rotation getRotationMatrix ( ) const

Returns the current orientation as a Rotation.

Returns
The rotation computed from the orientation data.
void setRotation ( const Rotation rotation)
inline

Sets the orientation from a Rotation.

Parameters
rotation: the Rotation to be used.
Deprecated:
See setRotationMatrix
Rotation getRotation ( ) const
inline

Returns the current orientation as a Rotation.

Returns
The rotation computed from the orientation data.
Deprecated:
See getRotationMatrix
void setIdentity ( )

Sets the current Orientation to identity.

static Orientation identity ( )
static

Creates an Orientation initialized to identity.

Returns
An identity Orientation.
void setZeros ( )

Fills the current Orientation with zeros.

static Orientation zeros ( )
static

Creates an Orientation filled with zeros.

Returns
An Orientation filled with zeros.
void normalise ( )

Normalizes the current Orientation.

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.
_FCT_CPU_GPU_ int size ( ) const
inlineinherited
_FCT_CPU_GPU_ const T* ptr ( ) const
inlineinherited
_FCT_CPU_GPU_ Vector4<T>& setValues ( const T *  b)
inlineinherited
_FCT_CPU_GPU_ T& operator[] ( int  i)
inlineinherited
_FCT_CPU_GPU_ const T& operator[] ( int  i) const
inlineinherited
_FCT_CPU_GPU_ float norm ( )
inlineinherited

returns the norm of the vector

_FCT_CPU_GPU_ float square ( )
inlineinherited

returns the squared norm of the vector

_FCT_CPU_GPU_ float sum ( )
inlineinherited

returns the sum of the vector

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

returns the dot product of two vector

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

returns the distance between two vector