Public Member Functions | Protected Attributes | Friends | List of all members
fVec3 Class Reference

3-element vector class. More...

#include <fMatrix3.h>

Public Member Functions

void add (const fVec3 &vec1, const fVec3 &vec2)
 
void add (const fVec3 &vec)
 
void cross (const fVec3 &vec1, const fVec3 &vec2)
 Cross product. More...
 
double * data ()
 Pointer to the first element. More...
 
void div (const fVec3 &vec, double d)
 
void epddot2angacc (const fEulerPara &_e, const fEulerPara &_de, const fEulerPara &_dde)
 Computes angular acceleration from the acceleration of Euler parameters. More...
 
void epdot2angvel (const fEulerPara &epara, const fEulerPara &edot)
 Computes the angular velocity from the velocity of Euler parameters. More...
 
 fVec3 ()
 
 fVec3 (double *ini)
 
 fVec3 (double ini)
 
 fVec3 (const fVec3 &ini)
 
 fVec3 (double _m1, double _m2, double _m3)
 
double length () const
 
void mat2ea_xyz (const fMat33 &mat)
 Orientation matrix to Euler angles. More...
 
void mat2ea_xyz (const fMat33 &mat, const fVec3 &ea_ref)
 
void mat2ea_xzy (const fMat33 &mat)
 
void mat2ea_yzx (const fMat33 &mat)
 
void mat2ea_zyx (const fMat33 &mat)
 
void mul (const fVec3 &vec, double d)
 
void mul (double d, const fVec3 &vec)
 
void mul (const fMat33 &mat, const fVec3 &vec)
 
void mul (const fVec3 &vec, const fMat33 &mat)
 v^T*M, same as mat^T * vec. More...
 
void neg (const fVec3 &vec)
 
 operator double * ()
 
double & operator() (int i)
 Access the i-th element. More...
 
double operator() (int i) const
 
void operator*= (double d)
 
void operator+= (const fVec3 &vec)
 
void operator-= (const fVec3 &vec)
 
void operator/= (double d)
 
void operator= (double d)
 Assignment operators. More...
 
fVec3 operator= (const fVec3 &vec)
 
double operator[] (int i) const
 
void rotation (const fMat33 &ref, const fMat33 &tgt)
 Computes the rotation from tgt to ref. More...
 
void set (double *v)
 Set element values from array or three values. More...
 
void set (double d1, double d2, double d3)
 
void set (const fVec3 &vec)
 Functions for basic operations. More...
 
void sub (const fVec3 &vec1, const fVec3 &vec2)
 
void unit ()
 Converts to unit vector. More...
 
void zero ()
 Creates a zero vector. More...
 
 ~fVec3 ()
 

Protected Attributes

double m1
 
double m2
 
double m3
 
int n_col
 
int n_row
 
double temp
 

Friends

double dist (const fVec3 &p1, const fVec3 &p2)
 Returns the distance between two points. More...
 
class fMat33
 
double length (const fVec3 &v)
 Returns the length of a vector. More...
 
fVec3 operator& (const fVec3 &vec1, const fVec3 &vec2)
 
fVec3 operator* (double d, const fVec3 &vec1)
 
fVec3 operator* (const fVec3 &vec1, double d)
 
double operator* (const fVec3 &vec1, const fVec3 &vec2)
 
fVec3 operator+ (const fVec3 &vec1, const fVec3 &vec2)
 
fVec3 operator- (const fVec3 &vec)
 operators More...
 
fVec3 operator- (const fVec3 &vec1, const fVec3 &vec2)
 
fVec3 operator/ (const fVec3 &vec, double d)
 
HRPBASE_EXPORT ostream & operator<< (ostream &ost, const fVec3 &mat)
 Outputs to a stream. More...
 
fVec3 unit (const fVec3 &v)
 Returns the unit vector with the same direction (with length check) More...
 

Detailed Description

3-element vector class.

Definition at line 206 of file fMatrix3.h.

Constructor & Destructor Documentation

◆ fVec3() [1/5]

fVec3::fVec3 ( )
inline

Definition at line 210 of file fMatrix3.h.

◆ fVec3() [2/5]

fVec3::fVec3 ( double *  ini)
inline

Definition at line 216 of file fMatrix3.h.

◆ fVec3() [3/5]

fVec3::fVec3 ( double  ini)
inline

Definition at line 224 of file fMatrix3.h.

◆ fVec3() [4/5]

fVec3::fVec3 ( const fVec3 ini)
inline

Definition at line 230 of file fMatrix3.h.

◆ fVec3() [5/5]

fVec3::fVec3 ( double  _m1,
double  _m2,
double  _m3 
)
inline

Definition at line 238 of file fMatrix3.h.

◆ ~fVec3()

fVec3::~fVec3 ( )
inline

Definition at line 246 of file fMatrix3.h.

Member Function Documentation

◆ add() [1/2]

void fVec3::add ( const fVec3 vec1,
const fVec3 vec2 
)

Definition at line 888 of file fMatrix3.cpp.

◆ add() [2/2]

void fVec3::add ( const fVec3 vec)

Definition at line 895 of file fMatrix3.cpp.

◆ cross()

void fVec3::cross ( const fVec3 vec1,
const fVec3 vec2 
)

Cross product.

Definition at line 944 of file fMatrix3.cpp.

◆ data()

double* fVec3::data ( )
inline

Pointer to the first element.

Definition at line 259 of file fMatrix3.h.

◆ div()

void fVec3::div ( const fVec3 vec,
double  d 
)

Definition at line 909 of file fMatrix3.cpp.

◆ epddot2angacc()

void fVec3::epddot2angacc ( const fEulerPara _e,
const fEulerPara _de,
const fEulerPara _dde 
)

Computes angular acceleration from the acceleration of Euler parameters.

Computes angular acceleration from the acceleration of Euler parameters.

Parameters
[in]_eCurrent orientation.
[in]_deCurrent Euler parameter velocity.
[in]_ddeCurrent Euler parameter acceleration.

Definition at line 198 of file fMatrix3.cpp.

◆ epdot2angvel()

void fVec3::epdot2angvel ( const fEulerPara epara,
const fEulerPara edot 
)

Computes the angular velocity from the velocity of Euler parameters.

Computes the angular velocity from the velocity of Euler parameters.

Parameters
[in]eparaCurrent orientation.
[in]edotCurrent Euler parameter velocity.

Definition at line 186 of file fMatrix3.cpp.

◆ length()

double fVec3::length ( void  ) const
inline

Definition at line 296 of file fMatrix3.h.

◆ mat2ea_xyz() [1/2]

void fVec3::mat2ea_xyz ( const fMat33 mat)

Orientation matrix to Euler angles.

Definition at line 39 of file fMatrix3.cpp.

◆ mat2ea_xyz() [2/2]

void fVec3::mat2ea_xyz ( const fMat33 mat,
const fVec3 ea_ref 
)

Definition at line 154 of file fMatrix3.cpp.

◆ mat2ea_xzy()

void fVec3::mat2ea_xzy ( const fMat33 mat)

Definition at line 72 of file fMatrix3.cpp.

◆ mat2ea_yzx()

void fVec3::mat2ea_yzx ( const fMat33 mat)

Definition at line 138 of file fMatrix3.cpp.

◆ mat2ea_zyx()

void fVec3::mat2ea_zyx ( const fMat33 mat)

Definition at line 105 of file fMatrix3.cpp.

◆ mul() [1/4]

void fVec3::mul ( const fVec3 vec,
double  d 
)

Definition at line 916 of file fMatrix3.cpp.

◆ mul() [2/4]

void fVec3::mul ( double  d,
const fVec3 vec 
)

Definition at line 923 of file fMatrix3.cpp.

◆ mul() [3/4]

void fVec3::mul ( const fMat33 mat,
const fVec3 vec 
)

Definition at line 930 of file fMatrix3.cpp.

◆ mul() [4/4]

void fVec3::mul ( const fVec3 vec,
const fMat33 mat 
)

v^T*M, same as mat^T * vec.

Definition at line 937 of file fMatrix3.cpp.

◆ neg()

void fVec3::neg ( const fVec3 vec)

Definition at line 881 of file fMatrix3.cpp.

◆ operator double *()

fVec3::operator double * ( )
inline

Definition at line 262 of file fMatrix3.h.

◆ operator()() [1/2]

double & fVec3::operator() ( int  i)

Access the i-th element.

Definition at line 541 of file fMatrix3.cpp.

◆ operator()() [2/2]

double fVec3::operator() ( int  i) const

Definition at line 553 of file fMatrix3.cpp.

◆ operator*=()

void fVec3::operator*= ( double  d)

Definition at line 805 of file fMatrix3.cpp.

◆ operator+=()

void fVec3::operator+= ( const fVec3 vec)

Definition at line 791 of file fMatrix3.cpp.

◆ operator-=()

void fVec3::operator-= ( const fVec3 vec)

Definition at line 798 of file fMatrix3.cpp.

◆ operator/=()

void fVec3::operator/= ( double  d)

Definition at line 812 of file fMatrix3.cpp.

◆ operator=() [1/2]

void fVec3::operator= ( double  d)

Assignment operators.

Definition at line 762 of file fMatrix3.cpp.

◆ operator=() [2/2]

fVec3 fVec3::operator= ( const fVec3 vec)

Definition at line 767 of file fMatrix3.cpp.

◆ operator[]()

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

Definition at line 252 of file fMatrix3.h.

◆ rotation()

void fVec3::rotation ( const fMat33 ref,
const fMat33 tgt 
)

Computes the rotation from tgt to ref.

Definition at line 954 of file fMatrix3.cpp.

◆ set() [1/3]

void fVec3::set ( double *  v)
inline

Set element values from array or three values.

Definition at line 314 of file fMatrix3.h.

◆ set() [2/3]

void fVec3::set ( double  d1,
double  d2,
double  d3 
)
inline

Definition at line 319 of file fMatrix3.h.

◆ set() [3/3]

void fVec3::set ( const fVec3 vec)

Functions for basic operations.

Definition at line 874 of file fMatrix3.cpp.

◆ sub()

void fVec3::sub ( const fVec3 vec1,
const fVec3 vec2 
)

Definition at line 902 of file fMatrix3.cpp.

◆ unit()

void fVec3::unit ( )
inline

Converts to unit vector.

Definition at line 308 of file fMatrix3.h.

◆ zero()

void fVec3::zero ( )
inline

Creates a zero vector.

Definition at line 283 of file fMatrix3.h.

Friends And Related Function Documentation

◆ dist

double dist ( const fVec3 p1,
const fVec3 p2 
)
friend

Returns the distance between two points.

Definition at line 287 of file fMatrix3.h.

◆ fMat33

friend class fMat33
friend

Definition at line 208 of file fMatrix3.h.

◆ length

double length ( const fVec3 v)
friend

Returns the length of a vector.

Definition at line 293 of file fMatrix3.h.

◆ operator&

fVec3 operator & ( const fVec3 vec1,
const fVec3 vec2 
)
friend

Definition at line 773 of file fMatrix3.cpp.

◆ operator* [1/3]

fVec3 operator* ( double  d,
const fVec3 vec1 
)
friend

Definition at line 862 of file fMatrix3.cpp.

◆ operator* [2/3]

fVec3 operator* ( const fVec3 vec1,
double  d 
)
friend

Definition at line 853 of file fMatrix3.cpp.

◆ operator* [3/3]

double operator* ( const fVec3 vec1,
const fVec3 vec2 
)
friend

Definition at line 846 of file fMatrix3.cpp.

◆ operator+

fVec3 operator+ ( const fVec3 vec1,
const fVec3 vec2 
)
friend

Definition at line 828 of file fMatrix3.cpp.

◆ operator- [1/2]

fVec3 operator- ( const fVec3 vec)
friend

operators

Definition at line 782 of file fMatrix3.cpp.

◆ operator- [2/2]

fVec3 operator- ( const fVec3 vec1,
const fVec3 vec2 
)
friend

Definition at line 819 of file fMatrix3.cpp.

◆ operator/

fVec3 operator/ ( const fVec3 vec,
double  d 
)
friend

Definition at line 837 of file fMatrix3.cpp.

◆ operator<<

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

Outputs to a stream.

Definition at line 968 of file fMatrix3.cpp.

◆ unit

fVec3 unit ( const fVec3 v)
friend

Returns the unit vector with the same direction (with length check)

Definition at line 300 of file fMatrix3.h.

Member Data Documentation

◆ m1

double fVec3::m1
protected

Definition at line 364 of file fMatrix3.h.

◆ m2

double fVec3::m2
protected

Definition at line 364 of file fMatrix3.h.

◆ m3

double fVec3::m3
protected

Definition at line 364 of file fMatrix3.h.

◆ n_col

int fVec3::n_col
protected

Definition at line 366 of file fMatrix3.h.

◆ n_row

int fVec3::n_row
protected

Definition at line 366 of file fMatrix3.h.

◆ temp

double fVec3::temp
protected

Definition at line 365 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