chrono::ChMatrix33< Real > Class Template Reference

Description

template<typename Real = double>
class chrono::ChMatrix33< Real >

Definition of a 3x3 fixed-size matrix to represent 3D rotations and inertia tensors.

#include <ChMatrix33.h>

Inherits Matrix< Real, 3, 3, Eigen::RowMajor >.

Public Member Functions

 ChMatrix33 ()
 Default constructor: uninitialized 3x3 matrix.
 
template<typename OtherDerived >
 ChMatrix33 (const Eigen::MatrixBase< OtherDerived > &other)
 Constructor from Eigen expressions.
 
 ChMatrix33 (Real val)
 Construct a diagonal matrix with the specified value on the diagonal.
 
 ChMatrix33 (const ChVector3< Real > &v)
 Construct a diagonal matrix with the specified values on the diagonal.
 
 ChMatrix33 (const ChVector3d &diag, const ChVector3d &off_diag)
 Construct a symmetric 3x3 matrix with the specified vectors for the diagonal and off-digonal elements. More...
 
 ChMatrix33 (const ChQuaternion< Real > &q)
 Construct a 3x3 rotation matrix from the given quaternion.
 
 ChMatrix33 (Real angle, const ChVector3d &axis)
 Construct a 3x3 rotation matrix from an angle and a rotation axis. More...
 
 ChMatrix33 (const ChVector3d &X, const ChVector3d &Y, const ChVector3d &Z)
 Construct a 3x3 matrix with the given vectors as columns. More...
 
template<typename OtherDerived >
ChMatrix33operator= (const Eigen::MatrixBase< OtherDerived > &other)
 This method allows assigning Eigen expressions to ChMatrix33.
 
ChVector3< Real > operator* (const ChVector3< Real > &v) const
 Multiply this matrix by a 3d vector.
 
void SetFromQuaternion (const ChQuaternion< Real > &q)
 Fill this 3x3 matrix as a rotation matrix, given a unit quaternion.
 
void SetFromEulerAnglesZXZ (const ChVector3< Real > &angles)
 Fill this 3x3 matrix as a rotation matrix, given three Euler angles.
 
void SetFromCardanAnglesZXY (const ChVector3< Real > &angles)
 Fill this 3x3 matrix as a rotation matrix, given three Cardano angles.
 
void SetFromCardanAnglesZYX (const ChVector3< Real > &angles)
 Fill this 3x3 matrix as a rotation matrix, given three head, pitch, banking angles.
 
void SetFromCardanAnglesXYZ (const ChVector3< Real > &angles)
 Fill this 3x3 matrix as a rotation matrix, given three angles of consecutive rotations about x,y,z axis.
 
void SetFromRodriguesParameters (const ChVector3< Real > &r)
 Fill this 3x3 matrix as a rotation matrix, given three Rodrigues parameters.
 
void SetFromDirectionAxes (const ChVector3< Real > &X, const ChVector3< Real > &Y, const ChVector3< Real > &Z)
 Fill this 3x3 matrix as a rotation matrix, given the three versors X,Y,Z of the basis.
 
void SetFromAxisX (const ChVector3< Real > &x_dir, const ChVector3< Real > &y_sugg=ChVector3< Real >(0, 1, 0))
 Fill this 3x3 matrix as a rotation matrix with the X axis along the provided direction. More...
 
void SetFromAxisY (const ChVector3< Real > &y_dir, const ChVector3< Real > &z_sugg=ChVector3< Real >(0, 0, 1))
 Fill this 3x3 matrix as a rotation matrix with the Y axis along the provided direction. More...
 
void SetFromAxisZ (const ChVector3< Real > &z_dir, const ChVector3< Real > &x_sugg=ChVector3< Real >(1, 0, 0))
 Fill this 3x3 matrix as a rotation matrix with the Z axis along the provided direction. More...
 
ChVector3< Real > GetAxisX () const
 Return the unit vector along the X axis.
 
ChVector3< Real > GetAxisY () const
 Return the unit vector along the Y axis.
 
ChVector3< Real > GetAxisZ () const
 Return the unit vector along the Z axis.
 
ChQuaternion< Real > GetQuaternion () const
 Return the corresponding unit quaternion. More...
 
ChVector3< Real > GetEulerAnglesZXZ () const
 Return the Euler angles. More...
 
ChVector3< Real > GetCardanAnglesZXY () const
 Return the Cardano angles. More...
 
ChVector3< Real > GetCardanAnglesZYX () const
 Return the head-pitch-banking angles. More...
 
ChVector3< Real > GetCardanAnglesXYZ () const
 Return the angles for consecutive rotations on x,y,z axes. More...
 
ChVector3< Real > GetRodriguesParameters () const
 Return the Rodrigues parameters. More...
 
void SelfAdjointEigenSolve (ChMatrix33< Real > &evec, ChVectorN< Real, 3 > &evals) const
 Compute eigenvectors and eigenvalues. More...
 

The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/core/ChMatrix33.h