Translation Class Reference

Designed to contain translation data of the positional tracking. More...

General Functions

 Translation ()
 empty Translation default constructor. More...
 
 Translation (const Translation &translation)
 Translation copy constructor (deep copy). More...
 
 Translation (float t1, float t2, float t3)
 Translation constructor. More...
 
 Translation (float3 in)
 Translation constructor. More...
 
Translation operator* (const Orientation &mat) const
 Multiplication operator by an Orientation. More...
 
void normalize ()
 Normalizes the current translation. More...
 
float & operator() (int x)
 Get the value at specific position in the Translation. More...
 
_FCT_CPU_GPU_ int size () const
 
_FCT_CPU_GPU_ const float * ptr () const
 
_FCT_CPU_GPU_ Vector3< float > & setValues (const float *b)
 
_FCT_CPU_GPU_ float & operator[] (int i)
 
_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 Translation normalize (const Translation &tr)
 Get the normalized version of a given Translation. More...
 
static _FCT_CPU_GPU_ float dot (const Vector3< float > &a, const Vector3< float > &b)
 returns the dot product of two vector More...
 
static _FCT_CPU_GPU_ float distance (const Vector3< float > &a, const Vector3< float > &b)
 returns the distance between two vector More...
 
static _FCT_CPU_GPU_ Vector3< float > cross (const Vector3< float > &a, const Vector3< float > &b)
 returns the cross product between two vector More...
 

Detailed Description

Designed to contain translation data of the positional tracking.

Translation is a vector as [tx, ty, tz]. You can access the data with the 't' ptr or by element name as : tx, ty, tz <-> | 0 1 2 |

Constructor and Destructor

empty Translation default constructor.

Translation ( const Translation translation)

Translation copy constructor (deep copy).

Parameters
translation: the Translation to copy.
Translation ( float  t1,
float  t2,
float  t3 
)

Translation constructor.

Parameters
t1: the x translation.
t2: the y translation.
t3: the z translation.

Translation constructor.

Parameters
in: vector.

Functions

Translation operator* ( const Orientation mat) const

Multiplication operator by an Orientation.

Parameters
mat: Orientation.
Returns
The current Translation after being multiplied by the orientation.
void normalize ( )

Normalizes the current translation.

static Translation normalize ( const Translation tr)
static

Get the normalized version of a given Translation.

Parameters
tr: the Translation to be used.
Returns
An other Translation object, which is equal to tr.normalize.
float& operator() ( int  x)

Get the value at specific position in the Translation.

Parameters
x: the position of the value
Returns
The value at the x position.
_FCT_CPU_GPU_ int size ( ) const
inlineinherited
_FCT_CPU_GPU_ const float * ptr ( ) const
inlineinherited
_FCT_CPU_GPU_ Vector3<float >& setValues ( const float *  b)
inlineinherited
_FCT_CPU_GPU_ float & operator[] ( int  i)
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 Vector3< float > &  a,
const Vector3< float > &  b 
)
inlinestaticinherited

returns the dot product of two vector

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

returns the distance between two vector

static _FCT_CPU_GPU_ Vector3<float > cross ( const Vector3< float > &  a,
const Vector3< float > &  b 
)
inlinestaticinherited

returns the cross product between two vector