Translation Class Reference

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

Functions

def init_translation (self, Translation tr)
 Deep copy from another Translation  . More...
 
def init_vector (self, float t1, float t2, float t3)
   More...
 
def normalize (self)
  Normalizes the current translation.
 
def normalize_translation (self, Translation tr)
 Gets the normalized version of a given Translation . More...
 
def size (self)
 Gets the size of the translation vector. More...
 
def dot_translation (Translation tr1, Translation tr2)
 Computes the dot product of two Translation objects. More...
 
def get (self)
 Gets the Translation as a numpy array. 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 get method that returns a numpy array.

Functions

◆ init_translation()

def init_translation (   self,
Translation  tr 
)

Deep copy from another Translation  .

Parameters
tr: Translation to be copied

◆ init_vector()

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

 

Parameters
t1: First float value  
t2: Second float value  
t3: Third float value

◆ normalize_translation()

def normalize_translation (   self,
Translation  tr 
)

Gets the normalized version of a given Translation .

 

Parameters
tr: Translation to be used  
Returns
Another Translation object, which is equal to tr.normalize.

◆ size()

def size (   self)

Gets the size of the translation vector.

 

Returns
the vector size

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

◆ dot_translation()

def dot_translation ( Translation  tr1,
Translation  tr2 
)

Computes the dot product of two Translation objects.

Parameters
tr1: first vector, defined ad a Translation
tr2: sencond vector, defined as a Translation  
Returns
dot product of tr1 and tr2

◆ get()

def get (   self)

Gets the Translation as a numpy array.

 

Returns
A numpy array of float with the Translation values.