KDL
1.4.0
|
A concrete implementation of a 3 dimensional vector class. More...
#include <src/frames.hpp>
Public Member Functions | |
Vector () | |
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that. More... | |
Vector (double x, double y, double z) | |
Constructs a vector out of the three values x, y and z. More... | |
Vector (const Vector &arg) | |
Assignment operator. The normal copy by value semantics. More... | |
Vector & | operator= (const Vector &arg) |
Assignment operator. The normal copy by value semantics. More... | |
double | operator() (int index) const |
Access to elements, range checked when NDEBUG is not set, from 0..2. More... | |
double & | operator() (int index) |
Access to elements, range checked when NDEBUG is not set, from 0..2. More... | |
double | operator[] (int index) const |
Equivalent to double operator()(int index) const. More... | |
double & | operator[] (int index) |
Equivalent to double& operator()(int index) More... | |
double | x () const |
double | y () const |
double | z () const |
void | x (double) |
void | y (double) |
void | z (double) |
void | ReverseSign () |
Reverses the sign of the Vector object itself. More... | |
Vector & | operator-= (const Vector &arg) |
subtracts a vector from the Vector object itself More... | |
Vector & | operator+= (const Vector &arg) |
Adds a vector from the Vector object itself. More... | |
double | Normalize (double eps=epsilon) |
Normalizes this vector and returns it norm makes v a unitvector and returns the norm of v. More... | |
double | Norm () const |
void | Set2DXY (const Vector2 &v) |
a 3D vector where the 2D vector v is put in the XY plane More... | |
void | Set2DYZ (const Vector2 &v) |
a 3D vector where the 2D vector v is put in the YZ plane More... | |
void | Set2DZX (const Vector2 &v) |
a 3D vector where the 2D vector v is put in the ZX plane More... | |
void | Set2DPlane (const Frame &F_someframe_XY, const Vector2 &v_XY) |
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY. More... | |
Static Public Member Functions | |
static Vector | Zero () |
Public Attributes | |
double | data [3] |
Friends | |
class | Rotation |
class | Frame |
Vector | operator* (const Vector &lhs, double rhs) |
Scalar multiplication is defined. More... | |
Vector | operator* (double lhs, const Vector &rhs) |
Scalar multiplication is defined. More... | |
Vector | operator/ (const Vector &lhs, double rhs) |
Scalar division is defined. More... | |
Vector | operator+ (const Vector &lhs, const Vector &rhs) |
Vector | operator- (const Vector &lhs, const Vector &rhs) |
Vector | operator* (const Vector &lhs, const Vector &rhs) |
Vector | operator- (const Vector &arg) |
double | dot (const Vector &lhs, const Vector &rhs) |
void | SetToZero (Vector &v) |
To have a uniform operator to put an element to zero, for scalar values and for objects. More... | |
bool | Equal (const Vector &a, const Vector &b, double eps) |
do not use operator == because the definition of Equal(.,.) is slightly different. More... | |
bool | operator== (const Vector &a, const Vector &b) |
The literal equality operator==(), also identical. More... | |
bool | operator!= (const Vector &a, const Vector &b) |
The literal inequality operator!=(). More... | |
A concrete implementation of a 3 dimensional vector class.
|
inline |
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.
References data.
Referenced by Normalize().
|
inline |
Constructs a vector out of the three values x, y and z.
|
inline |
Assignment operator. The normal copy by value semantics.
References data.
double KDL::Vector::Norm | ( | ) | const |
References data.
Referenced by KDL::Frame::Integrate(), Normalize(), and KDL::Path_Line::Path_Line().
double KDL::Vector::Normalize | ( | double | eps = epsilon | ) |
Normalizes this vector and returns it norm makes v a unitvector and returns the norm of v.
if v is smaller than eps, Vector(1,0,0) is returned with norm 0. if this is not good, check the return value of this method.
References Norm(), and Vector().
Referenced by KDL::Rotation::GetRotAngle(), KDL::Path_Line::Path_Line(), KDL::RotationVel::Rot(), and KDL::Rotation::Rot().
|
inline |
Access to elements, range checked when NDEBUG is not set, from 0..2.
|
inline |
Access to elements, range checked when NDEBUG is not set, from 0..2.
Referenced by operator[]().
Assignment operator. The normal copy by value semantics.
References data.
|
inline |
Equivalent to double& operator()(int index)
References operator()().
|
inline |
Equivalent to double operator()(int index) const.
References operator()().
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.
References Set2DXY().
|
inline |
a 3D vector where the 2D vector v is put in the XY plane
References data.
Referenced by Set2DPlane().
|
inline |
a 3D vector where the 2D vector v is put in the YZ plane
References data.
|
inline |
a 3D vector where the 2D vector v is put in the ZX plane
References data.
|
inline |
Referenced by KDL::TreeIkSolverPos_Online::enforceCartVelLimits().
|
inline |
|
inline |
Referenced by KDL::TreeIkSolverPos_Online::enforceCartVelLimits().
|
inline |
|
inline |
Referenced by KDL::TreeIkSolverPos_Online::enforceCartVelLimits().
|
inline |
|
inlinestatic |
Referenced by KDL::ChainDynParam::ChainDynParam(), KDL::ChainIdSolver_RNE::ChainIdSolver_RNE(), KDL::RigidBodyInertia::getCOG(), KDL::Frame::Identity(), KDL::Joint::JointAxis(), SetToZero(), and KDL::RigidBodyInertia::Zero().
do not use operator == because the definition of Equal(.,.) is slightly different.
It compares whether the 2 arguments are equal in an eps-interval
|
friend |
The literal inequality operator!=().
The literal equality operator==(), also identical.
|
friend |
|
friend |
To have a uniform operator to put an element to zero, for scalar values and for objects.
double KDL::Vector::data[3] |
Referenced by KDL::TreeIkSolverVel_wdls::CartToJnt(), KDL::ChainIdSolver_Vereshchagin::constraint_calculation(), KDL::ChainIdSolver_Vereshchagin::downwards_sweep(), KDL::Rotation::Inverse(), Norm(), KDL::operator*(), KDL::RotationalInertia::operator*(), KDL::Rotation::operator*(), operator+=(), operator-=(), operator=(), KDL::RigidBodyInertia::RefPoint(), ReverseSign(), KDL::RigidBodyInertia::RigidBodyInertia(), KDL::Rotation::Rotation(), Set2DXY(), Set2DYZ(), Set2DZX(), KDL::Jacobian::setColumn(), and Vector().