Skip to content

Namespace inertialsim::geometry::matrix

Namespace List > inertialsim > geometry > matrix

Rotation matrix representation conversions (internal API). More...

Public Functions

Type Name
RotationMatrixArray FromAxisAngle (const Vector3D & axis, const Scalar1D & angle, bool passive=false)
Rotation matrix representation from axis and angle.
RotationMatrixArray FromEuler (const EulerAngles & angles, const std::string & sequence, bool passive=false)
Rotation matrix representation from Euler angles.
RotationMatrixArray FromMatrix (const RotationMatrixArray & matrix)
Rotation matrix representation from rotation matrix.
RotationMatrixArray FromQuaternion (const Quaternion & quaternion)
Rotation matrix representation from quaternion.
RotationMatrixArray FromRotationVector (const RotationVector & rotation_vector, bool passive=false)
Rotation matrix representation from rotation vector.
RotationMatrix Orthonormalize (const RotationMatrix & matrix)
Orthonormalize an invalid rotation matrix using SVD.
RotationMatrixArray Validate (const RotationMatrixArray & matrix)
Validates inputs meet rotation matrix conventions.

Detailed Description

Internal API

This namespace is part of InertialSim's internal API. Most users should use the Rotation class and its factory methods rather than calling these functions directly.

See also: Rotation

Public Functions Documentation

function FromAxisAngle

Rotation matrix representation from axis and angle.

RotationMatrixArray inertialsim::geometry::matrix::FromAxisAngle (
    const  Vector3D & axis,
    const  Scalar1D & angle,
    bool passive=false
) 

Parameters:

  • axis Unit vector(s) representing the axis of rotation (3, N).
  • angle Angle(s) which are applied around the corresponding axis (N).
  • passive Interpret the rotation as passive.

Returns:

Rotation matrices.


function FromEuler

Rotation matrix representation from Euler angles.

RotationMatrixArray inertialsim::geometry::matrix::FromEuler (
    const  EulerAngles & angles,
    const std::string & sequence,
    bool passive=false
) 

Parameters:

  • angles Euler angles in radians (3, N).
  • sequence Three-character string defining the axis sequence (e.g., "XYZ").
  • passive Interpret the rotation as passive.

Returns:

Rotation matrices.


function FromMatrix

Rotation matrix representation from rotation matrix.

RotationMatrixArray inertialsim::geometry::matrix::FromMatrix (
    const  RotationMatrixArray & matrix
) 

Parameters:

  • matrix Vector of 3x3 rotation matrices.

Returns:

Validated rotation matrices.


function FromQuaternion

Rotation matrix representation from quaternion.

RotationMatrixArray inertialsim::geometry::matrix::FromQuaternion (
    const  Quaternion & quaternion
) 

Parameters:

  • quaternions Quaternions (4, N), with scalar part first.

Returns:

Rotation matrices.


function FromRotationVector

Rotation matrix representation from rotation vector.

RotationMatrixArray inertialsim::geometry::matrix::FromRotationVector (
    const  RotationVector & rotation_vector,
    bool passive=false
) 

Parameters:

  • rotation_vectors Rotation vectors.
  • passive Interpret the rotation as passive.

Returns:

Rotation matrices.


function Orthonormalize

Orthonormalize an invalid rotation matrix using SVD.

RotationMatrix inertialsim::geometry::matrix::Orthonormalize (
    const  RotationMatrix & matrix
) 

Returns the closest proper rotation matrix to the input as measured by the Frobenius norm. For extremely noisy inputs, this function may return a reflection (determinant -1.0).

Parameters:

  • matrix 3x3 matrix to orthonormalize.

Returns:

The orthonormalized 3x3 matrix.


function Validate

Validates inputs meet rotation matrix conventions.

RotationMatrixArray inertialsim::geometry::matrix::Validate (
    const  RotationMatrixArray & matrix
) 

Parameters:

  • matrices Vector of 3x3 matrices.

Returns:

Validated rotation matrices.



The documentation for this class was generated from the following file cpp/include/inertialsim/geometry/rotation_conversions/matrix.h