Public Member Functions | Friends | List of all members
fMat33 Class Reference

3x3 matrix class. More...

#include <fMatrix3.h>

Public Member Functions

 fMat33 ()
 Default constructor. More...
 
 fMat33 (double *ini)
 Constructor with initial values as array. More...
 
 fMat33 (double ini)
 Constructor with the same initial diagonal value. More...
 
 fMat33 (double _m11, double _m12, double _m13, double _m21, double _m22, double _m23, double _m31, double _m32, double _m33)
 Constructor with all values. More...
 
 fMat33 (double d1, double d2, double d3)
 Constructor with diagonal values. More...
 
 fMat33 (const fMat33 &ini)
 Copy constructor. More...
 
double & operator() (int i, int j)
 The reference to the (i, j)-th element. More...
 
double operator() (int i, int j) const
 The value of the (i, j)-th element. More...
 
fMat33 operator= (const fMat33 &mat)
 Assignment operator. More...
 
void operator= (double d)
 Set the same value to the diagonal elements. More...
 
double operator[] (int i) const
 Value of the i-th element in the array. More...
 
 ~fMat33 ()
 Destructor. More...
 

Friends

class fVec3
 

Operators

fMat33 operator- (const fMat33 &mat)
 
fMat33 operator+ (const fMat33 &mat1, const fMat33 &mat2)
 
fMat33 operator- (const fMat33 &mat1, const fMat33 &mat2)
 
fMat33 operator* (double d, const fMat33 &mat)
 
fMat33 operator* (const fMat33 &m1, const fMat33 &m2)
 
fVec3 operator* (const fMat33 &m, const fVec3 &v)
 
fMat33 operator* (const fMat33 &mat, double d)
 
fMat33 operator/ (const fMat33 &mat, double d)
 
HRPBASE_EXPORT ostream & operator<< (ostream &ost, const fMat33 &mat)
 Outputs the elements to a stream. More...
 
fMat33 tran (const fMat33 &m)
 Returns the transpose. More...
 
double m11
 
double m21
 
double m31
 
double m12
 
double m22
 
double m32
 
double m13
 
double m23
 
double m33
 
double temp
 
int n_row
 
int n_col
 
void operator+= (const fMat33 &mat)
 
void operator-= (const fMat33 &mat)
 
void operator*= (double d)
 
void operator/= (double d)
 
 operator double * ()
 Converts to an array. More...
 
double * data ()
 Pointer to the first element. More...
 
void tran (const fMat33 &)
 Sets the transpose. More...
 
void cross (const fVec3 &p)
 Sets spectial matrices. More...
 
void diag (double, double, double)
 Diagonal matrix. More...
 
void identity ()
 Identity matrix. More...
 
void zero ()
 
void set (const fMat33 &mat)
 Copies a matrix. More...
 
void set (const class fEulerPara &ep)
 Convert from Euler parameter description. More...
 
void neg (const fMat33 &mat)
 Functions for basic operations. More...
 
void add (const fMat33 &mat1, const fMat33 &mat2)
 
void add (const fMat33 &mat)
 
void sub (const fMat33 &mat1, const fMat33 &mat2)
 
void mul (const fMat33 &mat1, const fMat33 &mat2)
 
void mul (double d, const fMat33 &mat)
 
void mul (const fMat33 &mat, double d)
 
void div (const fMat33 &mat, double d)
 
void mul (const fVec3 &v1, const fVec3 &v2)
 
void rot2mat (const fVec3 &, double)
 Converts from/to equivalent rotation axis and angle. More...
 
void mat2rot (fVec3 &, double &) const
 
void ea2mat_xyz (const fVec3 &ea)
 Converts from Euler angles. More...
 
void ea2mat_xzy (const fVec3 &ea)
 Euler angles to matrix. More...
 
void ea2mat_zyx (const fVec3 &ea)
 Euler angles to matrix. More...
 
void ea2mat_yzx (const fVec3 &ea)
 Euler angles to matrix. More...
 

Detailed Description

3x3 matrix class.

Definition at line 29 of file fMatrix3.h.

Constructor & Destructor Documentation

◆ fMat33() [1/6]

fMat33::fMat33 ( )
inline

Default constructor.

Creates a 3x3 matrix and initialize as an identity matrix.

Definition at line 37 of file fMatrix3.h.

◆ fMat33() [2/6]

fMat33::fMat33 ( double *  ini)
inline

Constructor with initial values as array.

Constructor with initial values as array of at least 9 elements.

Definition at line 49 of file fMatrix3.h.

◆ fMat33() [3/6]

fMat33::fMat33 ( double  ini)
inline

Constructor with the same initial diagonal value.

Constructor with initial diagonal values.

Definition at line 61 of file fMatrix3.h.

◆ fMat33() [4/6]

fMat33::fMat33 ( double  _m11,
double  _m12,
double  _m13,
double  _m21,
double  _m22,
double  _m23,
double  _m31,
double  _m32,
double  _m33 
)
inline

Constructor with all values.

Constructor with all values.

Definition at line 74 of file fMatrix3.h.

◆ fMat33() [5/6]

fMat33::fMat33 ( double  d1,
double  d2,
double  d3 
)
inline

Constructor with diagonal values.

Constructor with diagonal values.

Definition at line 88 of file fMatrix3.h.

◆ fMat33() [6/6]

fMat33::fMat33 ( const fMat33 ini)
inline

Copy constructor.

Copy constructor.

Definition at line 100 of file fMatrix3.h.

◆ ~fMat33()

fMat33::~fMat33 ( )
inline

Destructor.

Definition at line 116 of file fMatrix3.h.

Member Function Documentation

◆ add() [1/2]

void fMat33::add ( const fMat33 mat1,
const fMat33 mat2 
)

Definition at line 655 of file fMatrix3.cpp.

◆ add() [2/2]

void fMat33::add ( const fMat33 mat)

Definition at line 668 of file fMatrix3.cpp.

◆ cross()

void fMat33::cross ( const fVec3 p)

Sets spectial matrices.

Cross product matrix.

Definition at line 217 of file fMatrix3.cpp.

◆ data()

double* fMat33::data ( )
inline

Pointer to the first element.

Definition at line 158 of file fMatrix3.h.

◆ diag()

void fMat33::diag ( double  v1,
double  v2,
double  v3 
)

Diagonal matrix.

Definition at line 224 of file fMatrix3.cpp.

◆ div()

void fMat33::div ( const fMat33 mat,
double  d 
)

Definition at line 746 of file fMatrix3.cpp.

◆ ea2mat_xyz()

void fMat33::ea2mat_xyz ( const fVec3 ea)

Converts from Euler angles.

Euler angles to matrix

Definition at line 23 of file fMatrix3.cpp.

◆ ea2mat_xzy()

void fMat33::ea2mat_xzy ( const fVec3 ea)

Euler angles to matrix.

Definition at line 56 of file fMatrix3.cpp.

◆ ea2mat_yzx()

void fMat33::ea2mat_yzx ( const fVec3 ea)

Euler angles to matrix.

Definition at line 122 of file fMatrix3.cpp.

◆ ea2mat_zyx()

void fMat33::ea2mat_zyx ( const fVec3 ea)

Euler angles to matrix.

Definition at line 89 of file fMatrix3.cpp.

◆ identity()

void fMat33::identity ( )

Identity matrix.

Definition at line 230 of file fMatrix3.cpp.

◆ mat2rot()

void fMat33::mat2rot ( fVec3 axis,
double &  angle 
) const

Definition at line 253 of file fMatrix3.cpp.

◆ mul() [1/4]

void fMat33::mul ( const fMat33 mat1,
const fMat33 mat2 
)

Definition at line 694 of file fMatrix3.cpp.

◆ mul() [2/4]

void fMat33::mul ( double  d,
const fMat33 mat 
)

Definition at line 707 of file fMatrix3.cpp.

◆ mul() [3/4]

void fMat33::mul ( const fMat33 mat,
double  d 
)

Definition at line 720 of file fMatrix3.cpp.

◆ mul() [4/4]

void fMat33::mul ( const fVec3 v1,
const fVec3 v2 
)

Definition at line 733 of file fMatrix3.cpp.

◆ neg()

void fMat33::neg ( const fMat33 mat)

Functions for basic operations.

Definition at line 648 of file fMatrix3.cpp.

◆ operator double *()

fMat33::operator double * ( )
inline

Converts to an array.

Definition at line 154 of file fMatrix3.h.

◆ operator()() [1/2]

double & fMat33::operator() ( int  i,
int  j 
)

The reference to the (i, j)-th element.

Definition at line 517 of file fMatrix3.cpp.

◆ operator()() [2/2]

double fMat33::operator() ( int  i,
int  j 
) const

The value of the (i, j)-th element.

Definition at line 529 of file fMatrix3.cpp.

◆ operator*=()

void fMat33::operator*= ( double  d)

Definition at line 443 of file fMatrix3.cpp.

◆ operator+=()

void fMat33::operator+= ( const fMat33 mat)

Definition at line 417 of file fMatrix3.cpp.

◆ operator-=()

void fMat33::operator-= ( const fMat33 mat)

Definition at line 430 of file fMatrix3.cpp.

◆ operator/=()

void fMat33::operator/= ( double  d)

Definition at line 450 of file fMatrix3.cpp.

◆ operator=() [1/2]

fMat33 fMat33::operator= ( const fMat33 mat)

Assignment operator.

Definition at line 380 of file fMatrix3.cpp.

◆ operator=() [2/2]

void fMat33::operator= ( double  d)

Set the same value to the diagonal elements.

Definition at line 394 of file fMatrix3.cpp.

◆ operator[]()

double fMat33::operator[] ( int  i) const
inline

Value of the i-th element in the array.

Definition at line 125 of file fMatrix3.h.

◆ rot2mat()

void fMat33::rot2mat ( const fVec3 axis,
double  angle 
)

Converts from/to equivalent rotation axis and angle.

Definition at line 362 of file fMatrix3.cpp.

◆ set() [1/2]

void fMat33::set ( const fMat33 mat)

Copies a matrix.

Definition at line 623 of file fMatrix3.cpp.

◆ set() [2/2]

void fMat33::set ( const class fEulerPara ep)

Convert from Euler parameter description.

◆ sub()

void fMat33::sub ( const fMat33 mat1,
const fMat33 mat2 
)

Definition at line 681 of file fMatrix3.cpp.

◆ tran()

void fMat33::tran ( const fMat33 )

Sets the transpose.

◆ zero()

void fMat33::zero ( )

Zero matrix.

Definition at line 236 of file fMatrix3.cpp.

Friends And Related Function Documentation

◆ fVec3

friend class fVec3
friend

Definition at line 31 of file fMatrix3.h.

◆ operator* [1/4]

fMat33 operator* ( double  d,
const fMat33 mat 
)
friend

Definition at line 487 of file fMatrix3.cpp.

◆ operator* [2/4]

fMat33 operator* ( const fMat33 m1,
const fMat33 m2 
)
friend

Definition at line 502 of file fMatrix3.cpp.

◆ operator* [3/4]

fVec3 operator* ( const fMat33 m,
const fVec3 v 
)
friend

Definition at line 565 of file fMatrix3.cpp.

◆ operator* [4/4]

fMat33 operator* ( const fMat33 mat,
double  d 
)
friend

Definition at line 574 of file fMatrix3.cpp.

◆ operator+

fMat33 operator+ ( const fMat33 mat1,
const fMat33 mat2 
)
friend

Definition at line 457 of file fMatrix3.cpp.

◆ operator- [1/2]

fMat33 operator- ( const fMat33 mat)
friend

Definition at line 402 of file fMatrix3.cpp.

◆ operator- [2/2]

fMat33 operator- ( const fMat33 mat1,
const fMat33 mat2 
)
friend

Definition at line 472 of file fMatrix3.cpp.

◆ operator/

fMat33 operator/ ( const fMat33 mat,
double  d 
)
friend

Definition at line 589 of file fMatrix3.cpp.

◆ operator<<

HRPBASE_EXPORT ostream& operator<< ( ostream &  ost,
const fMat33 mat 
)
friend

Outputs the elements to a stream.

Definition at line 974 of file fMatrix3.cpp.

◆ tran

void fMat33::tran ( const fMat33 m)
friend

Returns the transpose.

Definition at line 607 of file fMatrix3.cpp.

Member Data Documentation

◆ m11

double fMat33::m11
protected

Definition at line 195 of file fMatrix3.h.

◆ m12

double fMat33::m12
protected

Definition at line 196 of file fMatrix3.h.

◆ m13

double fMat33::m13
protected

Definition at line 197 of file fMatrix3.h.

◆ m21

double fMat33::m21
protected

Definition at line 195 of file fMatrix3.h.

◆ m22

double fMat33::m22
protected

Definition at line 196 of file fMatrix3.h.

◆ m23

double fMat33::m23
protected

Definition at line 197 of file fMatrix3.h.

◆ m31

double fMat33::m31
protected

Definition at line 195 of file fMatrix3.h.

◆ m32

double fMat33::m32
protected

Definition at line 196 of file fMatrix3.h.

◆ m33

double fMat33::m33
protected

Definition at line 197 of file fMatrix3.h.

◆ n_col

int fMat33::n_col
protected

Definition at line 199 of file fMatrix3.h.

◆ n_row

int fMat33::n_row
protected

Definition at line 199 of file fMatrix3.h.

◆ temp

double fMat33::temp
protected

Definition at line 198 of file fMatrix3.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:07