Rotation Class Reference

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

Functions

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

Detailed Description

Class representing a rotation for the positional tracking module.

It inherits from the generic sl.Matrix3f class.

Functions

◆ init_rotation()

None init_rotation (   self,
Rotation  rot 
)

Deep copy from another sl.Rotation.

Parameters
rot: sl.Rotation to copy.

◆ init_matrix()

None init_matrix (   self,
Matrix3f  matrix 
)

Initializes the sl.Rotation from a sl.Matrix3f.

Parameters
matrix: sl.Matrix3f to be used.

Reimplemented from Matrix3f.

◆ init_orientation()

None init_orientation (   self,
Orientation  orient 
)

Initializes the sl.Rotation from an sl.Orientation.

Parameters
orient: sl.Orientation to be used.

◆ init_angle_translation()

None init_angle_translation (   self,
float  angle,
Translation  axis 
)

Initializes the sl.Rotation from an angle and an axis.

Parameters
angle: Rotation angle in radian.
axis: 3D axis to rotate around.

◆ set_orientation()

None set_orientation (   self,
Orientation  py_orientation 
)

Sets the sl.Rotation from an sl.Orientation.

Parameters
py_orientation: sl.Orientation containing the rotation to set.

◆ get_orientation()

Orientation get_orientation (   self)

Returns the sl.Orientation corresponding to the current sl.Rotation.

Returns
Rotation of the current orientation.

◆ get_rotation_vector()

np.array[float] get_rotation_vector (   self)

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

Returns
Rotation vector (NumPy array) created from the sl.Orientation values.

◆ set_rotation_vector()

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

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

Parameters
input0: rx component of the rotation vector.
input1: ry component of the rotation vector.
input2: rz component of the rotation vector.

◆ get_euler_angles()

np.array[float] get_euler_angles (   self,
  radian = True 
)

Converts the sl.Rotation into Euler angles.

Parameters
radian: Whether the angle will be returned in radian or degree. Default: True
Returns
Euler angles (NumPy array) created from the sl.Rotation values representing the rotations around the X, Y and Z axes using YZX convention.

◆ set_euler_angles()

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

Sets the sl.Rotation from Euler angles.

Parameters
input0: Roll value.
input1: Pitch value.
input2: Yaw value.
radian: Whether the angle is in radian or degree. Default: True

◆ inverse_mat()

Matrix3f inverse_mat (   self,
Matrix3f  rotation 
)
inherited

Returns the inverse of a sl.Matrix3f.

Parameters
rotation: sl.Matrix3f to compute the inverse from.
Returns
The inverse of the sl.Matrix3f given as input.

◆ transpose_mat()

Matrix3f transpose_mat (   self,
Matrix3f  rotation 
)
inherited

Returns the transpose of a sl.Matrix3f.

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

◆ set_identity()

Matrix3f set_identity (   self)
inherited

Sets the sl.Matrix3f to identity.

Returns
itself

◆ identity()

Matrix3f identity (   self)
inherited

Creates an identity sl.Matrix3f.

Returns
A sl.Matrix3f set to identity.

◆ zeros()

Matrix3f zeros (   self)
inherited

Creates a sl.Matrix3f filled with zeros.

Returns
A sl.Matrix3f filled with zeros.

◆ get_infos()

str get_infos (   self)
inherited

Returns the components of the sl.Matrix3f in a string.

Returns
A string containing the components of the current sl.Matrix3f.

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