chai3d::cMatrix3d Struct Reference

This class implements a 3D matrix. More...

#include <CMatrix3d.h>

Public Member Functions

 cMatrix3d ()
 
 cMatrix3d (const double &a_m00, const double &a_m01, const double &a_m02, const double &a_m10, const double &a_m11, const double &a_m12, const double &a_m20, const double &a_m21, const double &a_m22)
 
 cMatrix3d (const cVector3d &a_colVector0, const cVector3d &a_colVector1, const cVector3d &a_colVector2)
 
 cMatrix3d (const double &a_angle1, const double &a_angle2, const double &a_angle3, const cEulerOrder a_eulerOrder, const bool a_useIntrinsicEulerModel=true, const bool a_anglesDefinedInDegrees=false)
 
 cMatrix3d (const cVector3d &a_axis, const double &a_angleRad)
 
 cMatrix3d (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleRad)
 
void identity ()
 This method builds an identity matrix. More...
 
void set (const double &a_value)
 This method initializes all elements of this matrix with an input value. More...
 
void set (const double a_source[3][3])
 This method initializes this matrix from an array. More...
 
void set (const double &a_m00, const double &a_m01, const double &a_m02, const double &a_m10, const double &a_m11, const double &a_m12, const double &a_m20, const double &a_m21, const double &a_m22)
 This method initializes this matrix with individual elements passed as arguments. More...
 
void setCol (const cVector3d &a_vectCol0, const cVector3d &a_vectCol1, const cVector3d &a_vectCol2)
 This method initialize this matrix with column vectors passed as arguments. More...
 
void setCol0 (const cVector3d &a_vectCol)
 This method initializes column 0 of this matrix. More...
 
void setCol1 (const cVector3d &a_vectCol)
 This method initializes column 1 of this matrix. More...
 
void setCol2 (const cVector3d &a_vectCol)
 This method initializes column 2 of this matrix. More...
 
void get (double *a_destination[])
 This method copies matrix elements to a table of doubles More...
 
cVector3d getCol0 () const
 This method returns column vector 0 of matrix. More...
 
cVector3d getCol1 () const
 This method returns column vector 1 of matrix. More...
 
cVector3d getCol2 () const
 This method returns column vector 2 of matrix. More...
 
cVector3d getRow (const unsigned int &a_index) const
 This method returns the i th row of matrix. More...
 
void copyto (cMatrix3d &a_destination) const
 This method copies all elements of this matrix to another matrix. More...
 
void copyfrom (const cMatrix3d &a_source)
 This method copies all elements from another matrix to this one. More...
 
bool equals (cMatrix3d &a_matrix) const
 This method compares if two matrices are equal. More...
 
void add (const cMatrix3d &a_matrix)
 This method computes the addition of this matrix with another. More...
 
void addr (const cMatrix3d &a_matrix, cMatrix3d &a_result) const
 This method computes the addition of this matrix with another. More...
 
void sub (const cMatrix3d &a_matrix)
 This method computes the subtraction of this matrix with another. More...
 
void subr (const cMatrix3d &a_matrix, cMatrix3d &a_result) const
 This method computes the subtraction of this matrix with another. More...
 
void mul (const cMatrix3d &a_matrix)
 This function computes the multiplication of this matrix with another. More...
 
void mulr (const cMatrix3d &a_matrix, cMatrix3d &a_result) const
 This function computes the multiplication of this matrix with another. More...
 
void mul (cVector3d &a_vector) const
 This function computes the multiplication of this matrix with a vector. More...
 
void mulr (const cVector3d &a_vector, cVector3d &a_result) const
 This function computes the multiplication of this matrix with a vector. More...
 
double det () const
 This method computes and returns the determinant of this matrix. More...
 
void trans ()
 This method computes the transpose of this matrix. More...
 
void transr (cMatrix3d &a_result) const
 This method computes the transpose of this matrix. More...
 
bool invert ()
 This method computes the inverse of this matrix. More...
 
bool invertr (cMatrix3d &a_result) const
 This method computes the inverse of this matrix. More...
 
void orthogonalize ()
 This method orthogonalizes this matrix. More...
 
bool setAxisAngleRotationRad (const cVector3d &a_axis, const double &a_angleRad)
 This method builds a rotation matrix from an axis-angle representation. More...
 
bool setAxisAngleRotationDeg (const cVector3d &a_axis, const double &a_angleDeg)
 This method builds a rotation matrix from an axis-angle representation. More...
 
bool setAxisAngleRotationRad (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleRad)
 This method builds a rotation matrix from an axis-angle representation. More...
 
bool setAxisAngleRotationDeg (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleDeg)
 This method builds a rotation matrix from axis-angle representation. More...
 
void setExtrinsicEulerRotationRad (const double &a_angle1, const double &a_angle2, const double &a_angle3, const cEulerOrder a_eulerOrder)
 This method builds a rotation matrix from an Euler angle representation. More...
 
void setExtrinsicEulerRotationDeg (const double &a_angle1, const double &a_angle2, const double &a_angle3, const cEulerOrder a_eulerOrder)
 This method builds a rotation matrix from an Euler angle representation. More...
 
void setIntrinsicEulerRotationRad (const double &a_angle1, const double &a_angle2, const double &a_angle3, const cEulerOrder a_eulerOrder)
 This method builds a rotation matrix from an Euler angle representation. More...
 
void setIntrinsicEulerRotationDeg (const double &a_angle1, const double &a_angle2, const double &a_angle3, const cEulerOrder a_eulerOrder)
 This method builds a rotation matrix from an Euler angle representation. More...
 
bool rotateAboutGlobalAxisRad (const cVector3d &a_axis, const double &a_angleRad)
 This method rotates this matrix around an axis described in global coordinates. More...
 
bool rotateAboutGlobalAxisDeg (const cVector3d &a_axis, const double &a_angleDeg)
 This method rotates this matrix around an axis described in global coordinates. More...
 
bool rotateAboutGlobalAxisRad (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleRad)
 This method rotates this matrix around an axis described in global coordinates. More...
 
bool rotateAboutGlobalAxisDeg (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleDeg)
 This method rotates this matrix around an axis described in global coordinates. More...
 
bool rotateAboutLocalAxisRad (const cVector3d &a_axis, const double &a_angleRad)
 This method rotates this matrix around an axis described in local coordinates. More...
 
bool rotateAboutLocalAxisDeg (const cVector3d &a_axis, const double &a_angleDeg)
 This method rotates this matrix around an axis described in local coordinates. More...
 
bool rotateAboutLocalAxisRad (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleRad)
 This method rotates this matrix around an axis described in local coordinates. More...
 
bool rotateAboutLocalAxisDeg (const double &a_axisX, const double &a_axisY, const double &a_axisZ, const double &a_angleDeg)
 This method rotates this matrix around an axis described in local coordinates. More...
 
bool toAxisAngle (cVector3d &a_axis, double &a_angle) const
 This method converts this rotation matrix to an axis-angle representation. More...
 
std::string str (const unsigned int a_precision=2) const
 This method converts this matrix to a string representation. More...
 
void operator*= (const double &a_val)
 An overloaded *= operator for matrix/scalar multiplication. More...
 
cVector3d operator* (const cVector3d &a_val)
 An overloaded * operator for matrix/vector multiplication. More...
 
cMatrix3d operator* (const cMatrix3d &a_val)
 An overloaded * operator for matrix/matrix multiplication. More...
 
void operator*= (const cMatrix3d &a_val)
 An overloaded *= operator for matrix/matrix multiplication. More...
 
void operator+= (const cMatrix3d &a_input)
 An overloaded += operator for matrix/matrix addition. More...
 
void operator-= (const cMatrix3d &a_input)
 An overloaded -= operator for matrix/matrix subtraction. More...
 
double & operator() (const int a_index0, const int a_index1)
 An overloaded () operator. More...
 
const double & operator() (const int a_index0, const int a_index1) const
 An overloaded () operator. More...
 

Detailed Description

This matrix class provides storage for a 3x3 double precision floating point matrix as well as basic matrix and vector operations.

Constructor & Destructor Documentation

chai3d::cMatrix3d::cMatrix3d ( )
inline

Constructor of cMatrix3d.

chai3d::cMatrix3d::cMatrix3d ( const double &  a_m00,
const double &  a_m01,
const double &  a_m02,
const double &  a_m10,
const double &  a_m11,
const double &  a_m12,
const double &  a_m20,
const double &  a_m21,
const double &  a_m22 
)
inline

Constructor of cMatrix3d.
Initializes matrix by passing as arguments values for each cell.

Parameters
a_m00Matrix Component (0,0)
a_m01Matrix Component (0,1)
a_m02Matrix Component (0,2)
a_m10Matrix Component (1,0)
a_m11Matrix Component (1,1)
a_m12Matrix Component (1,2)
a_m20Matrix Component (2,0)
a_m21Matrix Component (2,1)
a_m22Matrix Component (2,2)
chai3d::cMatrix3d::cMatrix3d ( const cVector3d a_colVector0,
const cVector3d a_colVector1,
const cVector3d a_colVector2 
)
inline

Constructor of cMatrix3d.
Initializes matrix from a set of column vectors passed as arguments.

Parameters
a_colVector0Column vector 0.
a_colVector1Column vector 1.
a_colVector2Column vector 2.
chai3d::cMatrix3d::cMatrix3d ( const double &  a_angle1,
const double &  a_angle2,
const double &  a_angle3,
const cEulerOrder  a_eulerOrder,
const bool  a_useIntrinsicEulerModel = true,
const bool  a_anglesDefinedInDegrees = false 
)
inline

Constructor of cMatrix3d.
Builds a rotation matrix from a set of Euler angles and co-moving axes of rotations.

Parameters
a_angle1Angle of the first rotation in the sequence.
a_angle2Angle of the second rotation in the sequence.
a_angle3Angle of the third rotation in the sequence.
a_eulerOrderThe order of the axes about which the rotations are to be applied
a_useIntrinsicEulerModelIf true use intrinsic Euler model, if false use extrinsic Euler model.
a_anglesDefinedInDegreesIf true then the angles passed by argument are defined in degrees, if false then the angles are defined in radians.
chai3d::cMatrix3d::cMatrix3d ( const cVector3d a_axis,
const double &  a_angleRad 
)
inline

Constructor of cMatrix3d.
Builds a rotation matrix from an axis-angle representation passed as argument.

Parameters
a_axisAxis vector.
a_angleRadAngle in radians.
chai3d::cMatrix3d::cMatrix3d ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleRad 
)
inline

Constructor of cMatrix3d.
Builds a rotation matrix from an axis-angle representation.

Parameters
a_axisXx component of axis.
a_axisYy component of axis.
a_axisZz component of axis.
a_angleRadAngle in radian.

Member Function Documentation

void chai3d::cMatrix3d::identity ( )
inline

This method builds an identity matrix with ones on the main diagonal and zeros elsewhere.

void chai3d::cMatrix3d::set ( const double &  a_value)
inline

This method initializes all elements of this matrix with an input scalar value a_value passed as argument.

Parameters
a_valueValue.
void chai3d::cMatrix3d::set ( const double  a_source[3][3])
inline

This method initializes this matrix from a table of doubles passed as argument.

Parameters
a_sourceTable of doubles.
void chai3d::cMatrix3d::set ( const double &  a_m00,
const double &  a_m01,
const double &  a_m02,
const double &  a_m10,
const double &  a_m11,
const double &  a_m12,
const double &  a_m20,
const double &  a_m21,
const double &  a_m22 
)
inline

This method initialize this matrix by passing as argument values for each cell.

Parameters
a_m00Matrix Component (0,0)
a_m01Matrix Component (0,1)
a_m02Matrix Component (0,2)
a_m10Matrix Component (1,0)
a_m11Matrix Component (1,1)
a_m12Matrix Component (1,2)
a_m20Matrix Component (2,0)
a_m21Matrix Component (2,1)
a_m22Matrix Component (2,2)
void chai3d::cMatrix3d::setCol ( const cVector3d a_vectCol0,
const cVector3d a_vectCol1,
const cVector3d a_vectCol2 
)
inline

This method initialize this matrix with column vectors passed as arguments a_vectCol0, a_vectCol1, and a_vectCol2.

this = [a_vectCol0, a_vectCol1, a_vectCol2]
Parameters
a_vectCol0Vector Column 0.
a_vectCol1Vector Column 1.
a_vectCol2Vector Column 2.
void chai3d::cMatrix3d::setCol0 ( const cVector3d a_vectCol)
inline

This method sets column 0 of this matrix by passing an input vector a_vectCol passed as argument.

Parameters
a_vectColVector Column 0.
void chai3d::cMatrix3d::setCol1 ( const cVector3d a_vectCol)
inline

This method sets column 1 of this matrix by passing an input vector a_vectCol passed as argument.

Parameters
a_vectColVector Column 1.
void chai3d::cMatrix3d::setCol2 ( const cVector3d a_vectCol)
inline

This method sets column 2 of this matrix by passing an input vector a_vectCol passed as argument.

Parameters
a_vectColVector Column 2.
void chai3d::cMatrix3d::get ( double *  a_destination[])
inline

This method copies matrix elements to a table a_destination of doubles passed as argument.

Parameters
a_destinationTable of doubles.
cVector3d chai3d::cMatrix3d::getCol0 ( ) const
inline

This method returns column vector 0 of matrix.

Returns
Column vector 0 of matrix.
cVector3d chai3d::cMatrix3d::getCol1 ( ) const
inline

This method returns column vector 1 of matrix.

Returns
Column vector 1 of matrix.
cVector3d chai3d::cMatrix3d::getCol2 ( ) const
inline

This method returns column vector 2 of matrix.

Returns
Column vector 2 of matrix.
cVector3d chai3d::cMatrix3d::getRow ( const unsigned int &  a_index) const
inline

This method returns the i th of matrix. The three components are returned through a cVector3d data structure.

Parameters
a_indexIndex of row. (0,1 or 2)
Returns
i th row of matrix.
void chai3d::cMatrix3d::copyto ( cMatrix3d a_destination) const
inline

This method copies all elements of this matrix to another matrix a_destination passed as argument.

a_destination = this
Parameters
a_destinationDestination matrix.
void chai3d::cMatrix3d::copyfrom ( const cMatrix3d a_source)
inline

This method copies all elements of a matrix a_source passed as argument to this one.

this = a_source
Parameters
a_sourceSource matrix.
bool chai3d::cMatrix3d::equals ( cMatrix3d a_matrix) const
inline

This methods compare two matrices and returns true if both matrices are equal, otherwise false.

Parameters
a_matrixMatrix to compare with.
Returns
true if elements of both matrices are equal, otherwise false.
void chai3d::cMatrix3d::add ( const cMatrix3d a_matrix)
inline

This method computes the addition of this matrix with a matrix passed as argument.
The result is stored in this matrix.

this = this + a_matrix
Parameters
a_matrixInput matrix.
void chai3d::cMatrix3d::addr ( const cMatrix3d a_matrix,
cMatrix3d a_result 
) const
inline

This method computes the addition of this matrix with a matrix passed as argument.
The result is stored is the result matrix a_result that is passed as argument.

a_result = this + a_matrix
Parameters
a_matrixInput matrix.
a_resultResult of operation.
void chai3d::cMatrix3d::sub ( const cMatrix3d a_matrix)
inline

This method computes the subtraction of this matrix with a matrix passed as argument.
The result is stored in this matrix.

this = this - a_matrix
Parameters
a_matrixInput matrix.
void chai3d::cMatrix3d::subr ( const cMatrix3d a_matrix,
cMatrix3d a_result 
) const
inline

This method computes the subtraction of this matrix with a matrix passed as argument.
The result is stored is the result matrix a_result that is passed as argument.

a_result = this - a_matrix
Parameters
a_matrixInput matrix.
a_resultResult of operation.
void chai3d::cMatrix3d::mul ( const cMatrix3d a_matrix)
inline

This function computes the multiplication of this matrix with a matrix a_matrix passed as argument.
The result of this operation is stored in this matrix overwriting previous values.

this = this * a_matrix
Parameters
a_matrixInput matrix.
void chai3d::cMatrix3d::mulr ( const cMatrix3d a_matrix,
cMatrix3d a_result 
) const
inline

This function computes the multiplication of this matrix with a matrix a_matrix passed as argument.
The result of this operation is stored in the result matrix a_result passed as argument.

a_result = this * a_matrix
Parameters
a_matrixInput matrix.
a_resultResult of operation.
void chai3d::cMatrix3d::mul ( cVector3d a_vector) const
inline

This function computes the multiplication of this matrix with a vector a_vector passed as argument.
The result of this operation is stored in the same vector a_vector overwriting previous values.

a_vector = this * a_vector
Parameters
a_vectorInput vector and return result.
void chai3d::cMatrix3d::mulr ( const cVector3d a_vector,
cVector3d a_result 
) const
inline

This function computes the multiplication of this matrix with a vector a_vector passed as argument.
The result of this operation is stored in the result vector a_result passed as second argument.

Parameters
a_vectorInput vector
a_resultResult of operation.
double chai3d::cMatrix3d::det ( ) const
inline

This method computes and returns the determinant of this matrix.

Returns
Determinant.of matrix.
void chai3d::cMatrix3d::trans ( )
inline

This method computes the transpose of this matrix.
The result of this operation is stored in this matrix overwriting previous values.

void chai3d::cMatrix3d::transr ( cMatrix3d a_result) const
inline

This method computes the transpose of this matrix.
The result of this operation is stored in the result matrix a_result matrix passed as argument.

Parameters
a_resultOutput matrix.
bool chai3d::cMatrix3d::invert ( )
inline

This method computes the inverse of this matrix.
If the operation succeeds, the result is stored in this matrix.

Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::invertr ( cMatrix3d a_result) const
inline

This method computes the inverse of this matrix.
If the operation succeeds, the result is stored in the result matrix a_result passed as argument.

Returns
true if operation succeeds, false otherwise.
void chai3d::cMatrix3d::orthogonalize ( )
inline

This method orthogonalizes this matrix so that all columns vectors are orthogonal to each other and of length 1. This method is useful if your rotation matrix has accumulated small error.

bool chai3d::cMatrix3d::setAxisAngleRotationRad ( const cVector3d a_axis,
const double &  a_angleRad 
)
inline

this method builds a rotation matrix from an input axis and angle defined in radians.
The result is stored in this matrix overwriting previous values.

Parameters
a_axisAxis of rotation.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::setAxisAngleRotationDeg ( const cVector3d a_axis,
const double &  a_angleDeg 
)
inline

This method builds a rotation matrix from an input axis and angle defined in degrees.
The result is stored in this matrix overwriting previous values.

Parameters
a_axisAxis of rotation.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::setAxisAngleRotationRad ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleRad 
)
inline

This method builds a rotation matrix from an input axis and angle defined in radians.
The result is stored in this matrix overwriting previous values.

Parameters
a_axisXComponent x of axis.
a_axisYComponent y of axis.
a_axisZComponent z of axis.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::setAxisAngleRotationDeg ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleDeg 
)
inline

This method builds a rotation matrix from an axis and angle defined in degrees.
The result is stored in this matrix overwriting previous values.

Parameters
a_axisXComponent x of axis.
a_axisYComponent y of axis.
a_axisZComponent z of axis.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
void chai3d::cMatrix3d::setExtrinsicEulerRotationRad ( const double &  a_angle1,
const double &  a_angle2,
const double &  a_angle3,
const cEulerOrder  a_eulerOrder 
)
inline

This method builds a rotation matrix from a set of Euler angles and fixed axes of rotations.

Parameters
a_angle1Angle in radians of the first rotation in the sequence.
a_angle2Angle in radians of the second rotation in the sequence.
a_angle3Angle in radians of the third rotation in the sequence.
a_eulerOrderThe order of the axes about which the rotations are to be applied.
void chai3d::cMatrix3d::setExtrinsicEulerRotationDeg ( const double &  a_angle1,
const double &  a_angle2,
const double &  a_angle3,
const cEulerOrder  a_eulerOrder 
)
inline

This method builds a rotation matrix from a set of Euler angles and fixed axes of rotations.

Parameters
a_angle1Angle in degrees of the first rotation in the sequence.
a_angle2Angle in degrees of the second rotation in the sequence.
a_angle3Angle in degrees of the third rotation in the sequence.
a_eulerOrderThe order of the axes about which the rotations are to be applied.
void chai3d::cMatrix3d::setIntrinsicEulerRotationRad ( const double &  a_angle1,
const double &  a_angle2,
const double &  a_angle3,
const cEulerOrder  a_eulerOrder 
)
inline

This method builds a rotation matrix from a set of Euler angles and co-moving axes of rotations.

Parameters
a_angle1Angle in radians of the first rotation in the sequence.
a_angle2Angle in radians of the second rotation in the sequence.
a_angle3Angle in radians of the third rotation in the sequence.
a_eulerOrderThe order of the axes about which the rotations are to be applied.
void chai3d::cMatrix3d::setIntrinsicEulerRotationDeg ( const double &  a_angle1,
const double &  a_angle2,
const double &  a_angle3,
const cEulerOrder  a_eulerOrder 
)
inline

This method builds a rotation matrix from a set of Euler angles and co-moving axes of rotations.

Parameters
a_angle1Angle in degrees of the first rotation in the sequence.
a_angle2Angle in degrees of the second rotation in the sequence.
a_angle3Angle in degrees of the third rotation in the sequence.
a_eulerOrderThe order of the axes about which the rotations are to be applied.
bool chai3d::cMatrix3d::rotateAboutGlobalAxisRad ( const cVector3d a_axis,
const double &  a_angleRad 
)
inline

This method rotates this matrix around an axis described in global coordinates.

Parameters
a_axisAxis of rotation.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutGlobalAxisDeg ( const cVector3d a_axis,
const double &  a_angleDeg 
)
inline

This method rotates this matrix around an axis described in global coordinates.

Parameters
a_axisAxis of rotation.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutGlobalAxisRad ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleRad 
)
inline

This method rotates this matrix around an axis described in global coordinates.

Parameters
a_axisXx component of axis.
a_axisYy component of axis.
a_axisZz component of axis.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutGlobalAxisDeg ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleDeg 
)
inline

This method rotates current matrix around an axis described in global coordinates.

Parameters
a_axisXx component of axis.
a_axisYy component of axis.
a_axisZz component of axis.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutLocalAxisRad ( const cVector3d a_axis,
const double &  a_angleRad 
)
inline

This method rotates this current matrix around an axis described in local coordinates.

Parameters
a_axisAxis of rotation.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutLocalAxisDeg ( const cVector3d a_axis,
const double &  a_angleDeg 
)
inline

This method rotates this matrix around an axis described in local coordinates.

Parameters
a_axisAxis of rotation.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutLocalAxisRad ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleRad 
)
inline

This method rotates this matrix around an axis described in local coordinates.

Parameters
a_axisXx component of axis.
a_axisYy component of axis.
a_axisZz component of axis.
a_angleRadAngle in radians.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::rotateAboutLocalAxisDeg ( const double &  a_axisX,
const double &  a_axisY,
const double &  a_axisZ,
const double &  a_angleDeg 
)
inline

This method rotates this matrix around an axis described in local coordinates.

Parameters
a_axisXx component of axis.
a_axisYy component of axis.
a_axisZz component of axis.
a_angleDegAngle in degrees.
Returns
true if operation succeeds, false otherwise.
bool chai3d::cMatrix3d::toAxisAngle ( cVector3d a_axis,
double &  a_angle 
) const
inline

This method converts this rotation matrix to an axis-angle representation.

Parameters
a_axisOutput axis.
a_angleOutput angle.
Returns
true if operation succeeds, false otherwise.
std::string chai3d::cMatrix3d::str ( const unsigned int  a_precision = 2) const
inline

This method converts this matrix to a string representation. The output springs displays the three column vectors of matrix.
The number of digits after the decimal point are set by argument a_precision.

Parameters
a_precisionNumber of digits.
Returns
Converted matrix in string format.
void chai3d::cMatrix3d::operator*= ( const double &  a_val)
inline
cVector3d chai3d::cMatrix3d::operator* ( const cVector3d a_val)
inline
cMatrix3d chai3d::cMatrix3d::operator* ( const cMatrix3d a_val)
inline
void chai3d::cMatrix3d::operator*= ( const cMatrix3d a_val)
inline
void chai3d::cMatrix3d::operator+= ( const cMatrix3d a_input)
inline
void chai3d::cMatrix3d::operator-= ( const cMatrix3d a_input)
inline
double& chai3d::cMatrix3d::operator() ( const int  a_index0,
const int  a_index1 
)
inline
const double& chai3d::cMatrix3d::operator() ( const int  a_index0,
const int  a_index1 
) const
inline

The documentation for this struct was generated from the following file: