Orientation Class Reference

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

Functions

def init_orientation (self, Orientation orient)
  Deep copy from another Orientation More...
 
def init_vector (self, float v0, float v1, float v2, float v3)
  Inits Orientation from float values. More...
 
def init_rotation (self, Rotation rotation)
  Inits Orientation from Rotation . More...
 
def init_translation (self, Translation tr1, Translation tr2)
  Inits Orientation from Translation   More...
 
def set_rotation_matrix (self, Rotation py_rotation)
  Sets the orientation from a Rotation   More...
 
def get_rotation_matrix (self)
 Returns the current orientation as a Rotation . More...
 
def set_identity (self)
  Sets the current Orientation to identity.
 
def identity (self)
 Creates an Orientation initialized to identity. More...
 
def set_zeros (self)
 Fills the current Orientation with zeros.
 
def zeros (self, orient=Orientation())
 Creates an Orientation filled with zeros. More...
 
def normalize (self)
  Normalizes the current Orientation .
 
def size (self)
  The size of the orientation vector. More...
 
def get (self)
  Returns a numpy array of the Orientation . More...
 

Static Functions

def normalize_orientation (Orientation orient)
 Creates the normalized version of an existing Orientation . More...
 

Detailed Description

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

 Orientation is a vector defined as [ox, oy, oz, ow].

Functions

◆ init_orientation()

def init_orientation (   self,
Orientation  orient 
)

 Deep copy from another Orientation

Parameters
orient: Orientation to be copied.

◆ init_vector()

def init_vector (   self,
float  v0,
float  v1,
float  v2,
float  v3 
)

 Inits Orientation from float values.

Parameters
v0: ox value  
v1: oy value  
v2: oz value  
v3: ow value

◆ init_rotation()

def init_rotation (   self,
Rotation  rotation 
)

 Inits Orientation from Rotation .

It converts the Rotation representation to the Orientation one.  

Parameters
rotation: Rotation to be converted

◆ init_translation()

def init_translation (   self,
Translation  tr1,
Translation  tr2 
)

 Inits Orientation from Translation  

Parameters
tr1: First Translation
tr2: Second Translation

◆ set_rotation_matrix()

def set_rotation_matrix (   self,
Rotation  py_rotation 
)

 Sets the orientation from a Rotation  

Parameters
rotation: the Rotation to be used.

◆ get_rotation_matrix()

def get_rotation_matrix (   self)

Returns the current orientation as a Rotation .

Returns
The rotation computed from the orientation data.

◆ identity()

def identity (   self)

Creates an Orientation initialized to identity.

 

Returns
An identity class Orientation .

◆ zeros()

def zeros (   self,
  orient = Orientation() 
)

Creates an Orientation filled with zeros.

Returns
An Orientation filled with zeros.

◆ normalize_orientation()

def normalize_orientation ( 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 .

◆ size()

def size (   self)

 The size of the orientation vector.

Returns
the size of the orientation vector.

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

◆ get()

def get (   self)

 Returns a numpy array of the Orientation .

 

Returns
A numpy array of the Orientation .