Class representing a rotation for the positional tracking module. More...
Functions | |
Rotation () | |
Default constructor. More... | |
Rotation (const Rotation &rotation) | |
Copy constructor (deep copy). More... | |
Rotation (const Matrix3f &mat) | |
sl::Rotation constructor from an sl::Matrix3f. More... | |
Rotation (const Orientation &orientation) | |
sl::Rotation constructor from an sl::Orientation. More... | |
Rotation (const float angle, const Translation &axis) | |
sl::Rotation constructor from an angle and an axis. More... | |
void | setOrientation (const Orientation &orientation) |
Sets the sl::Rotation from an sl::Orientation. More... | |
Orientation | getOrientation () const |
Returns the sl::Orientation corresponding to the current sl::Rotation. More... | |
float3 | getRotationVector () |
Returns the 3x1 rotation vector obtained from 3x3 rotation matrix using Rodrigues formula. More... | |
void | setRotationVector (const float3 &vec_rot) |
Sets the sl::Rotation from a rotation vector (using Rodrigues' transformation). More... | |
float3 | getEulerAngles (bool radian=true) const |
Converts the sl::Rotation into Euler angles. More... | |
void | setEulerAngles (const float3 &euler_angles, bool radian=true) |
Sets the sl::Rotation from Euler angles. More... | |
Matrix3f | operator* (const Matrix3f &mat) const |
Gives the result of the multiplication between two sl::Matrix3f. More... | |
Matrix3f | operator* (const float &scalar) const |
Gives the result of the multiplication between a sl::Matrix3f and a scalar. More... | |
Matrix3f | operator+ (const Matrix3f &mat) const |
Gives the result of the addition between two sl::Matrix3f. More... | |
Matrix3f | operator+ (const float &scalar) const |
Gives the result of the addition between a sl::Matrix3f and a scalar. More... | |
Matrix3f | operator- (const Matrix3f &mat) const |
Gives the result of the subtraction between two sl::Matrix3f. More... | |
Matrix3f | operator- (const float &scalar) const |
Gives the result of the subtraction between a sl::Matrix3f and a scalar. More... | |
bool | operator== (const Matrix3f &mat) const |
Test two sl::Matrix3f equality. More... | |
bool | operator!= (const Matrix3f &mat) const |
Test two sl::Matrix3f inequality. More... | |
float & | operator() (int u, int v) |
Gets access to a specific point in the sl::Matrix3f (read/write). More... | |
void | inverse () |
Sets the sl::Matrix3f to its inverse. More... | |
void | transpose () |
Sets the sl::Matrix3f to its transpose. More... | |
void | setIdentity () |
Sets the sl::Matrix3f to identity. More... | |
void | setZeros () |
Sets the sl::Matrix3f to zero. More... | |
String | getInfos () |
Returns the components of the sl::Matrix3f in a sl::String. More... | |
Static Functions | |
static Matrix3f | inverse (const Matrix3f &rotation) |
Returns the inverse of a sl::Matrix3f. More... | |
static Matrix3f | transpose (const Matrix3f &rotation) |
Returns the transpose of a sl::Matrix3f. More... | |
static Matrix3f | identity () |
Creates an identity sl::Matrix3f. More... | |
static Matrix3f | zeros () |
Creates a sl::Matrix3f filled with zeros. More... | |
Attributes | |
String | matrix_name |
Name of the matrix (optional). More... | |
Class representing a rotation for the positional tracking module.
It inherits from the generic sl::Matrix3f class.
Rotation | ( | ) |
Default constructor.
Creates a null rotation.
Copy constructor (deep copy).
rotation | : sl::Rotation to copy. |
Rotation | ( | const Matrix3f & | mat | ) |
sl::Rotation constructor from an sl::Matrix3f.
Copies the sl::Matrix3f (deep copy).
mat | : sl::Matrix3f to copy. |
Rotation | ( | const Orientation & | orientation | ) |
sl::Rotation constructor from an sl::Orientation.
It converts the Orientation representation to the Rotation one.
orientation | : the Orientation to be used. |
Rotation | ( | const float | angle, |
const Translation & | axis | ||
) |
sl::Rotation constructor from an angle and an axis.
angle | : Rotation angle in radian. |
axis | : 3D axis to rotate around. |
void setOrientation | ( | const Orientation & | orientation | ) |
Sets the sl::Rotation from an sl::Orientation.
orientation | : sl::Orientation containing the rotation to set. |
Orientation getOrientation | ( | ) | const |
Returns the sl::Orientation corresponding to the current sl::Rotation.
float3 getRotationVector | ( | ) |
Returns the 3x1 rotation vector obtained from 3x3 rotation matrix using Rodrigues formula.
void setRotationVector | ( | const float3 & | vec_rot | ) |
Sets the sl::Rotation from a rotation vector (using Rodrigues' transformation).
vec_rot | : Vector containing the rotation value for each axis (rx, ry, rz) . |
float3 getEulerAngles | ( | bool | radian = true | ) | const |
Converts the sl::Rotation into Euler angles.
radian | : Whether the angle will be returned in radian or degree. |
void setEulerAngles | ( | const float3 & | euler_angles, |
bool | radian = true |
||
) |
Sets the sl::Rotation from Euler angles.
euler_angles | : Euler angles (as a sl::float3) to update the sl::Rotation. |
radian | : Whether the angle is in radian or degree. |
|
inherited |
Gives the result of the multiplication between two sl::Matrix3f.
|
inherited |
Gives the result of the multiplication between a sl::Matrix3f and a scalar.
|
inherited |
Gives the result of the addition between two sl::Matrix3f.
|
inherited |
Gives the result of the addition between a sl::Matrix3f and a scalar.
|
inherited |
Gives the result of the subtraction between two sl::Matrix3f.
|
inherited |
Gives the result of the subtraction between a sl::Matrix3f and a scalar.
|
inherited |
Test two sl::Matrix3f equality.
|
inherited |
Test two sl::Matrix3f inequality.
|
inherited |
Gets access to a specific point in the sl::Matrix3f (read/write).
u | : Row to get the value from. |
v | : Column to get the value from. |
|
inherited |
Sets the sl::Matrix3f to its inverse.
|
staticinherited |
Returns the inverse of a sl::Matrix3f.
rotation | : sl::Matrix3f to compute the inverse from. |
|
inherited |
Sets the sl::Matrix3f to its transpose.
|
staticinherited |
Returns the transpose of a sl::Matrix3f.
rotation | : sl::Matrix3f to compute the transpose from. |
|
inherited |
Sets the sl::Matrix3f to identity.
|
staticinherited |
Creates an identity sl::Matrix3f.
|
inherited |
Sets the sl::Matrix3f to zero.
|
staticinherited |
Creates a sl::Matrix3f filled with zeros.
|
inherited |
Returns the components of the sl::Matrix3f in a sl::String.
|
inherited |
Name of the matrix (optional).