Translation Class Reference

Class representing a translation for the positional tracking module. More...

Functions

None init_translation (self, Translation tr)
 Deep copy from another sl.Translation. More...
 
None init_vector (self, float t1, float t2, float t3)
 Initializes the sl.Translation with its components. More...
 
None normalize (self)
 Normalizes the current sl.Translation.
 
Translation normalize_translation (self, Translation tr)
 Gets the normalized sl.Translation of a given sl.Translation. More...
 
int size (self)
 Gets the size of the sl.Translation. More...
 
float dot_translation (Translation tr1, Translation tr2)
 Computes the dot product of two sl.Translation objects. More...
 
np.array[float] get (self)
 Gets the sl.Translation as an NumPy array. More...
 

Detailed Description

Class representing a translation for the positional tracking module.

sl.Translation is a vector as [tx, ty, tz].
You can access the data with the get() method that returns a NumPy array.

Functions

◆ init_translation()

None init_translation (   self,
Translation  tr 
)

Deep copy from another sl.Translation.

Parameters
tr: sl.Translation to copy.

◆ init_vector()

None init_vector (   self,
float  t1,
float  t2,
float  t3 
)

Initializes the sl.Translation with its components.

Parameters
t1: First component.
t2: Second component.
t3: Third component.

◆ normalize_translation()

Translation normalize_translation (   self,
Translation  tr 
)

Gets the normalized sl.Translation of a given sl.Translation.

Parameters
tr: sl.Translation to be get the normalized translation from.
Returns
Another sl.Translation object equal to tr.normalize().

◆ size()

int size (   self)

Gets the size of the sl.Translation.

Returns
Size of the sl.Translation.

Referenced by Translation.get(), and Orientation.get().

◆ dot_translation()

float dot_translation ( Translation  tr1,
Translation  tr2 
)

Computes the dot product of two sl.Translation objects.

Parameters
tr1: First sl.Translation to get the dot product from.
tr2: Sencond sl.Translation to get the dot product from.
Returns
Dot product of tr1 and tr2.

◆ get()

np.array[float] get (   self)

Gets the sl.Translation as an NumPy array.

Returns
NumPy array containing the components of the sl.Translation.