Translation Class Reference

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

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

◆ Translation() [1/4]

empty Translation default constructor.

◆ Translation() [2/4]

Translation ( const Translation translation)

Translation copy constructor (deep copy).

Parameters
translation: the Translation to copy.

◆ Translation() [3/4]

Translation ( float  t1,
float  t2,
float  t3 
)

Translation constructor.

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

◆ Translation() [4/4]

Translation constructor.

Parameters
in: vector.

Functions

◆ operator*()

Translation operator* ( const Orientation mat) const

Multiplication operator by an Orientation.

Parameters
mat: Orientation.
Returns
The current Translation after being multiplied by the orientation.

◆ normalize() [1/2]

void normalize ( )

Normalizes the current translation.

◆ normalize() [2/2]

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.

◆ operator()()

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.

◆ size()

_FCT_CPU_GPU_ int size ( ) const
inlineinherited

◆ ptr()

_FCT_CPU_GPU_ const float * ptr ( ) const
inlineinherited

◆ setValues()

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

◆ operator[]()

_FCT_CPU_GPU_ float & operator[] ( int  i)
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 Vector3< float > &  a,
const Vector3< float > &  b 
)
inlinestaticinherited

returns the dot product of two vector

◆ distance()

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

returns the distance between two vector

◆ cross()

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

returns the cross product between two vector