Go to the documentation of this file.
16 #ifndef __F_MATRIX3_H__
17 #define __F_MATRIX3_H__
38 m11 = 1.0, m12 = 0.0, m13 = 0.0;
39 m21 = 0.0, m22 = 1.0, m23 = 0.0;
40 m31 = 0.0, m32 = 0.0, m33 = 1.0;
50 m11 = ini[0], m12 = ini[1], m13 = ini[2];
51 m21 = ini[3], m22 = ini[4], m23 = ini[5];
52 m31 = ini[6], m32 = ini[7], m33 = ini[8];
62 m11 = m22 = m33 = ini;
74 fMat33(
double _m11,
double _m12,
double _m13,
75 double _m21,
double _m22,
double _m23,
76 double _m31,
double _m32,
double _m33) {
77 m11 = _m11; m12 = _m12; m13 = _m13;
78 m21 = _m21; m22 = _m22; m23 = _m23;
79 m31 = _m31; m32 = _m32; m33 = _m33;
88 fMat33(
double d1,
double d2,
double d3) {
89 m11 = d1; m12 = 0.0; m13 = 0.0;
90 m21 = 0.0; m22 = d2; m23 = 0.0;
91 m31 = 0.0; m32 = 0.0; m33 = d3;
154 operator double *() {
167 void diag(
double,
double,
double);
185 void rot2mat(
const fVec3&,
double);
186 void mat2rot(
fVec3&,
double&)
const;
189 void ea2mat_xyz(
const fVec3& ea);
190 void ea2mat_xzy(
const fVec3& ea);
191 void ea2mat_zyx(
const fVec3& ea);
192 void ea2mat_yzx(
const fVec3& ea);
238 fVec3(
double _m1,
double _m2,
double _m3) {
262 operator double *() {
297 return sqrt((*
this) * (*
this));
303 if(len >
TINY) ret = v / len;
310 if(len >
TINY) (*this) /= len;
319 void set(
double d1,
double d2,
double d3) {
330 void div(
const fVec3& vec,
double d);
331 void mul(
const fVec3& vec,
double d);
332 void mul(
double d,
const fVec3& vec);
341 void mat2ea_xyz(
const fMat33& mat);
342 void mat2ea_xyz(
const fMat33& mat,
const fVec3& ea_ref);
343 void mat2ea_xzy(
const fMat33& mat);
344 void mat2ea_zyx(
const fMat33& mat);
345 void mat2ea_yzx(
const fMat33& mat);
void operator+=(const fMat33 &mat)
void sub(const fMat33 &mat1, const fMat33 &mat2)
void add(const fVec3 &vec1, const fVec3 &vec2)
double operator[](int i) const
Value of the i-th element in the array.
void set(const fMat33 &mat)
Copies a matrix.
void operator-=(const fMat33 &mat)
double * data()
Pointer to the first element.
void set(double d1, double d2, double d3)
void add(const fMat33 &mat1, const fMat33 &mat2)
fVec3(double _m1, double _m2, double _m3)
void operator*=(double d)
void mul(const fMat33 &mat1, const fMat33 &mat2)
double & operator()(int i)
Access the i-th element.
fMat33(double d1, double d2, double d3)
Constructor with diagonal values.
void operator/=(double d)
fMat33(double _m11, double _m12, double _m13, double _m21, double _m22, double _m23, double _m31, double _m32, double _m33)
Constructor with all values.
void operator-=(const fVec3 &vec)
fMat33(double *ini)
Constructor with initial values as array.
void set(double *v)
Set element values from array or three values.
fEulerPara operator-(const fEulerPara &_ep)
void unit()
Converts to unit vector.
void div(const fVec3 &vec, double d)
void operator=(double d)
Assignment operators.
fMat33()
Default constructor.
void operator*=(double d)
void div(const fMat33 &mat, double d)
fMat33(const fMat33 &ini)
Copy constructor.
fVec3 epddot2angacc(const fEulerPara &_e, const fEulerPara &_de, const fEulerPara &_dde)
double * data()
Pointer to the first element.
void neg(const fVec3 &vec)
fMat33 operator=(const fMat33 &mat)
Assignment operator.
fEulerPara operator*(double d, const fEulerPara &ep)
void sub(const fVec3 &vec1, const fVec3 &vec2)
std::ostream & operator<<(std::ostream &ost, const Point &p)
Vector3 cross(const Vector3 &v1, const Vector3 &v2)
fMat operator/(const fMat &mat, double d)
friend double length(const fVec3 &v)
Returns the length of a vector.
friend double dist(const fVec3 &p1, const fVec3 &p2)
Returns the distance between two points.
fVec3 epdot2angvel(const fEulerPara &_epara, const fEulerPara &_edot)
double operator[](int i) const
fMat tran(const fMat &mat)
fMat33(double ini)
Constructor with the same initial diagonal value.
fMat operator+(const fMat &mat1, const fMat &mat2)
png_bytep png_bytep png_size_t length
void operator+=(const fVec3 &vec)
Generic matrix/vector classes.
void neg(const fMat33 &mat)
Functions for basic operations.
friend fVec3 unit(const fVec3 &v)
Returns the unit vector with the same direction (with length check)
void operator/=(double d)
double & operator()(int i, int j)
The reference to the (i, j)-th element.
fVec3 operator&(const fVec3 &vec1, const fVec3 &vec2)
void zero()
Creates a zero vector.
void mul(const fVec3 &vec, double d)
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:02