All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Friends | List of all members
gazebo::math::Matrix3 Class Reference

A 3x3 matrix class. More...

#include <Matrix3.hh>

Public Member Functions

 Matrix3 ()
 Constructor.
 
 Matrix3 (const Matrix3 &_m)
 Copy constructor.
 
 Matrix3 (double _v00, double _v01, double _v02, double _v10, double _v11, double _v12, double _v20, double _v21, double _v22)
 Constructor.
 
virtual ~Matrix3 ()
 Desctructor.
 
bool operator== (const Matrix3 &_m) const
 Equality test operatorr.
 
const double * operator[] (size_t _row) const
 Array subscript operator.
 
double * operator[] (size_t _row)
 Array subscript operator.
 
void SetCol (unsigned int _c, const Vector3 &_v)
 Set a column.
 
void SetFromAxes (const Vector3 &_xAxis, const Vector3 &_yAxis, const Vector3 &_zAxis)
 Set the matrix from three axis (1 per column)
 
void SetFromAxis (const Vector3 &_axis, double _angle)
 Set the matrix from an axis and angle.
 

Protected Attributes

double m [3][3]
 the 3x3 matrix
 

Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::math::Matrix3 &_m)
 Stream insertion operator.
 

Detailed Description

A 3x3 matrix class.

Constructor & Destructor Documentation

gazebo::math::Matrix3::Matrix3 ( )

Constructor.

gazebo::math::Matrix3::Matrix3 ( const Matrix3 _m)

Copy constructor.

Parameters
_mMatrix to copy
gazebo::math::Matrix3::Matrix3 ( double  _v00,
double  _v01,
double  _v02,
double  _v10,
double  _v11,
double  _v12,
double  _v20,
double  _v21,
double  _v22 
)

Constructor.

Parameters
[in]_v00Row 0, Col 0 value
[in]_v01Row 0, Col 1 value
[in]_v02Row 0, Col 2 value
[in]_v10Row 1, Col 0 value
[in]_v11Row 1, Col 1 value
[in]_v12Row 1, Col 2 value
[in]_v20Row 2, Col 0 value
[in]_v21Row 2, Col 1 value
[in]_v22Row 2, Col 2 value
virtual gazebo::math::Matrix3::~Matrix3 ( )
virtual

Desctructor.

Member Function Documentation

bool gazebo::math::Matrix3::operator== ( const Matrix3 _m) const

Equality test operatorr.

Parameters
[in]_mMatrix3 to test
Returns
True if equal (using the default tolerance of 1e-6)
const double* gazebo::math::Matrix3::operator[] ( size_t  _row) const
inline

Array subscript operator.

Parameters
[in]_rowrow index
Returns
a pointer to the row

References m.

double* gazebo::math::Matrix3::operator[] ( size_t  _row)
inline

Array subscript operator.

Parameters
[in]_rowrow index
Returns
a pointer to the row

References m.

void gazebo::math::Matrix3::SetCol ( unsigned int  _c,
const Vector3 _v 
)

Set a column.

Parameters
[in]_cThe colum index (0, 1, 2)
[in]_vThe value to set in each row of the column
void gazebo::math::Matrix3::SetFromAxes ( const Vector3 _xAxis,
const Vector3 _yAxis,
const Vector3 _zAxis 
)

Set the matrix from three axis (1 per column)

Parameters
[in]_xAxisThe x axis
[in]_yAxisThe y axis
[in]_zAxisThe z axis
void gazebo::math::Matrix3::SetFromAxis ( const Vector3 _axis,
double  _angle 
)

Set the matrix from an axis and angle.

Parameters
[in]_axisthe axis
[in]_angleccw rotation around the axis in radians

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::math::Matrix3 _m 
)
friend

Stream insertion operator.

Parameters
[in]_outOutput stream
[in]_mMatrix to output
Returns
the stream

Member Data Documentation

double gazebo::math::Matrix3::m[3][3]
protected

the 3x3 matrix

Referenced by operator[]().


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