Class RotationMatrix#

Inheritance Relationships#

Base Type#

  • public Mat33

Class Documentation#

class RotationMatrix : public Mat33#

The direction-cosince 3x3 attitude representation matrix that is orthogonal and has +1 as one of its eigenvalues.

See Pose representations section for more discussion on attitude representations.

Public Functions

RotationMatrix()#

Default constructor.

RotationMatrix(const Mat33 &mat, bool orthogonalize = false, bool skip_values_check = false)#

Constructor from 3x3 matrix.

Parameters:
  • mat – The 3x3 matrix to create the RotationMatrix from.

  • orthogonalize – If true, orthogonalize the input values.

  • skip_values_check – If true, skip check that the matrix is orthogonal.

RotationMatrix(const RotationVector &rotvec)#

Constructor from a RotationVector.

Parameters:

rotvec – The RotationVector to create this RotationMatrix from.

RotationMatrix(const RotationMatrix &rv)#

Copy constructor.

Parameters:

rv – Other RotationMatrix to copy from.

RotationMatrix &operator=(const RotationMatrix &other)#

Copy assignment operator.

Parameters:

other – Other RotationMatrix to copy from.

Returns:

Reference to this object.

RotationMatrix(RotationMatrix &&rv) noexcept#

Move constructor.

Parameters:

rvRotationMatrix to move from.

RotationMatrix &operator=(RotationMatrix &&other) noexcept#

Move assignment operator.

Parameters:

otherRotationMatrix to move from.

Returns:

Reference to this object.

bool operator==(const RotationMatrix &other)#

Equality operator.

Parameters:

otherRotationMatrix to compare with.

Returns:

True if equal, false otherwise.

bool isApprox(const RotationMatrix &other, double prec = MATH_EPSILON)#

Approximate equality check.

Parameters:
  • otherRotationMatrix to compare with.

  • prec – Precision threshold.

Returns:

True if approximately equal, false otherwise.

std::string typeString() const#

Get the type string of this class.

Returns:

“RotationMatrix”

void setValues(const Mat33 &mat, bool orthogonalize = false, bool skip_values_check = false)#

Assign external values from a 3x3 matrix.

Since there is no guarantee on the values of the input matrix, we need to be careful to enable appropriate checks and orthogonalization as needed.

Parameters:
  • mat – Input matrix.

  • orthogonalize – If true, orthogonalize the input values.

  • skip_values_check – If true, skip check that the matrix is orthogonal.