Orientation Class Reference

Class representing an orientation/quaternion for the positional tracking module. More...

Functions

None init_orientation (self, Orientation orient)
 Deep copy from another sl.Orientation. More...
 
None init_vector (self, float v0, float v1, float v2, float v3)
 Initializes the sl.Orientation with its components. More...
 
None init_rotation (self, Rotation rotation)
 Initializes the sl.Orientation from an sl.Rotation. More...
 
None init_translation (self, Translation tr1, Translation tr2)
 Initializes the sl.Orientation from a vector represented by two sl.Translation. More...
 
None set_rotation_matrix (self, Rotation py_rotation)
 Sets the rotation component of the current sl.Transform from an sl.Rotation. More...
 
Rotation get_rotation_matrix (self)
 Returns the current sl.Orientation as an sl.Rotation. More...
 
None set_identity (self)
 Sets the current sl.Orientation to identity.
 
Orientation identity (self, orient=Orientation())
 Creates an sl.Orientation initialized to identity. More...
 
None set_zeros (self)
 Fills the current sl.Orientation with zeros.
 
Orientation zeros (self, orient=Orientation())
 Creates an sl.Orientation filled with zeros. More...
 
None normalize (self)
 Normalizes the current sl.Orientation.
 
int size (self)
 Gets the size of the sl.Orientation. More...
 
np.array[float] get (self)
 Returns a numpy array of the Orientation . More...
 

Static Functions

Orientation normalize_orientation (Orientation orient)
 Gets the normalized sl.Orientation of a given sl.Orientation. More...
 

Detailed Description

Class representing an orientation/quaternion for the positional tracking module.

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

Functions

◆ init_orientation()

None init_orientation (   self,
Orientation  orient 
)

Deep copy from another sl.Orientation.

Parameters
orient: sl.Orientation to copy.

◆ init_vector()

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

Initializes the sl.Orientation with its components.

Parameters
v0: ox component.
v1: oy component.
v2: oz component.
v3: ow component.

◆ init_rotation()

None init_rotation (   self,
Rotation  rotation 
)

Initializes the sl.Orientation from an sl.Rotation.

It converts the sl.Rotation representation to the sl.Orientation one.

Parameters
rotation: sl.Rotation to be used.

◆ init_translation()

None init_translation (   self,
Translation  tr1,
Translation  tr2 
)

Initializes the sl.Orientation from a vector represented by two sl.Translation.

Parameters
tr1: First point of the vector.
tr2: Second point of the vector.

◆ set_rotation_matrix()

None set_rotation_matrix (   self,
Rotation  py_rotation 
)

Sets the rotation component of the current sl.Transform from an sl.Rotation.

Parameters
py_rotation: sl.Rotation to be used.

◆ get_rotation_matrix()

Rotation get_rotation_matrix (   self)

Returns the current sl.Orientation as an sl.Rotation.

Returns
The rotation computed from the orientation data.

◆ identity()

Orientation identity (   self,
  orient = Orientation() 
)

Creates an sl.Orientation initialized to identity.

Returns
Identity sl.Orientation.

◆ zeros()

Orientation zeros (   self,
  orient = Orientation() 
)

Creates an sl.Orientation filled with zeros.

Returns
sl.Orientation filled with zeros.

◆ normalize_orientation()

Orientation normalize_orientation ( Orientation  orient)
static

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

Parameters
orient: sl.Orientation to be get the normalized orientation from.
Returns
Another sl.Orientation object equal to orient.normalize().

◆ size()

int size (   self)

Gets the size of the sl.Orientation.

Returns
Size of the sl.Orientation.

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

◆ get()

np.array[float] get (   self)

Returns a numpy array of the Orientation .

Returns
A numpy array of the Orientation .