Rotation Class Reference

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

Functions

def init_rotation (self, Rotation rot)
 Deep copy from another Rotation . More...
 
def init_matrix (self, Matrix3f matrix)
  Inits the Rotation from a Matrix3f . More...
 
def init_orientation (self, Orientation orient)
  Inits the Rotation from a Orientation . More...
 
def init_angle_translation (self, float angle, Translation axis)
  Inits the Rotation from an angle and an arbitrary 3D axis. More...
 
def set_orientation (self, Orientation py_orientation)
 Sets the Rotation from an Orientation . More...
 
def get_orientation (self)
 Returns the Orientation corresponding to the current Rotation . More...
 
def get_rotation_vector (self)
  Returns the 3x1 rotation vector obtained from 3x3 rotation matrix using Rodrigues formula. More...
 
def set_rotation_vector (self, float input0, float input1, float input2)
 Sets the Rotation from a rotation vector (using Rodrigues' transformation). More...
 
def get_euler_angles (self, radian=True)
 Converts the Rotation as Euler angles. More...
 
def set_euler_angles (self, float input0, float input1, float input2, radian=True)
 Sets the Rotation from the Euler angles  . More...
 
def inverse (self)
 Inverses the matrix.
 
def inverse_mat (self, Matrix3f rotation)
 Inverses the Matrix3f passed as a parameter. More...
 
def transpose (self)
 Sets the Matrix3f to its transpose.
 
def transpose_mat (self, Matrix3f rotation)
 Returns the transpose of a Matrix3f. More...
 
def set_identity (self)
 Sets the Matrix3f to identity. More...
 
def identity (self)
 Creates an identity Matrix3f  . More...
 
def set_zeros (self)
 Sets the Matrix3f to zero.
 
def zeros (self)
 Creates a Matrix3f filled with zeros. More...
 
def get_infos (self)
 Returns the components of the Matrix3f in a string. More...
 
def matrix_name (self)
 Name of the matrix (optional).
 
def r (self)
 Numpy array of inner data.
 

Detailed Description

Designed to contain rotation data of the positional tracking.

It inherits from the generic Matrix3f .

Functions

◆ init_rotation()

def init_rotation (   self,
Rotation  rot 
)

Deep copy from another Rotation .

 

Parameters
rot: Rotation to be copied.

◆ init_matrix()

def init_matrix (   self,
Matrix3f  matrix 
)

 Inits the Rotation from a Matrix3f .

 

Parameters
matrix: Matrix3f to be used.

Reimplemented from Matrix3f.

◆ init_orientation()

def init_orientation (   self,
Orientation  orient 
)

 Inits the Rotation from a Orientation .

 

Parameters
orient: Orientation to be used.

◆ init_angle_translation()

def init_angle_translation (   self,
float  angle,
Translation  axis 
)

 Inits the Rotation from an angle and an arbitrary 3D axis.

 

Parameters
angle: The rotation angle in rad.  
axis: the 3D axis (Translation) to rotate around

◆ set_orientation()

def set_orientation (   self,
Orientation  py_orientation 
)

Sets the Rotation from an Orientation .

 

Parameters
py_orientation: the Orientation containing the rotation to set.

◆ get_orientation()

def get_orientation (   self)

Returns the Orientation corresponding to the current Rotation .

Returns
The orientation of the current rotation.

◆ get_rotation_vector()

def get_rotation_vector (   self)

 Returns the 3x1 rotation vector obtained from 3x3 rotation matrix using Rodrigues formula.

Returns
The rotation vector (numpy array)

◆ set_rotation_vector()

def set_rotation_vector (   self,
float  input0,
float  input1,
float  input2 
)

Sets the Rotation from a rotation vector (using Rodrigues' transformation).

 

Parameters
input0: First float value  
input1: Second float value  
input2: Third float value

◆ get_euler_angles()

def get_euler_angles (   self,
  radian = True 
)

Converts the Rotation as Euler angles.

 

Parameters
radian: Bool to define whether the angle in is radian (True) or degree (False). Default: True  
Returns
The Euler angles, as a numpy array representing the rotations arround the X, Y and Z axes.

◆ set_euler_angles()

def set_euler_angles (   self,
float  input0,
float  input1,
float  input2,
  radian = True 
)

Sets the Rotation from the Euler angles  .

Parameters
input0: Roll value  
input1: Pitch value  
input2: Yaw value  
radian: Bool to define whether the angle in is radian (True) or degree (False). Default: True

◆ inverse_mat()

def inverse_mat (   self,
Matrix3f  rotation 
)
inherited

Inverses the Matrix3f passed as a parameter.

 

Parameters
rotation: the Matrix3f to inverse
Returns
the inversed Matrix3f

◆ transpose_mat()

def transpose_mat (   self,
Matrix3f  rotation 
)
inherited

Returns the transpose of a Matrix3f.

Parameters
rotation: the Matrix3f to compute the transpose from.
Returns
The transpose of the given Matrix3f

◆ set_identity()

def set_identity (   self)
inherited

Sets the Matrix3f to identity.

Returns
itself

◆ identity()

def identity (   self)
inherited

Creates an identity Matrix3f  .

Returns
a Matrix3f set to identity

◆ zeros()

def zeros (   self)
inherited

Creates a Matrix3f filled with zeros.

 

Returns
A Matrix3f filled with zeros

◆ get_infos()

def get_infos (   self)
inherited

Returns the components of the Matrix3f in a string.

Returns
A string containing the components of the current of Matrix3f

Referenced by Matrix4f.m(), and Mat.verbose().