KDL::Vector Class Reference

A concrete implementation of a 3 dimensional vector class. More...

#include <frames.hpp>

List of all members.

## Public Member Functions

double Norm () const
double Normalize (double eps=epsilon)
double operator() (int index) const
Access to elements, range checked when NDEBUG is not set, from 0..2.
double & operator() (int index)
Access to elements, range checked when NDEBUG is not set, from 0..2.
Vectoroperator+= (const Vector &arg)
Adds a vector from the Vector object itself.
Vectoroperator-= (const Vector &arg)
subtracts a vector from the Vector object itself
Vectoroperator= (const Vector &arg)
Assignment operator. The normal copy by value semantics.
double operator[] (int index) const
Equivalent to double operator()(int index) const.
double & operator[] (int index)
Equivalent to double& operator()(int index)
void ReverseSign ()
Reverses the sign of the Vector object itself.
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.
void Set2DXY (const Vector2 &v)
a 3D vector where the 2D vector v is put in the XY plane
void Set2DYZ (const Vector2 &v)
a 3D vector where the 2D vector v is put in the YZ plane
void Set2DZX (const Vector2 &v)
a 3D vector where the 2D vector v is put in the ZX plane
Vector ()
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.
Vector (double x, double y, double z)
Constructs a vector out of the three values x, y and z.
Vector (const Vector &arg)
Assignment operator. The normal copy by value semantics.
double x () const
void x (double)
double y () const
void y (double)
double z () const
void z (double)

## Static Public Member Functions

static Vector Zero ()

double data [3]

## Friends

double dot (const Vector &lhs, const Vector &rhs)
bool Equal (const Vector &a, const Vector &b, double eps)
class Frame
bool operator!= (const Vector &a, const Vector &b)
The literal inequality operator!=().
Vector operator* (const Vector &lhs, double rhs)
Scalar multiplication is defined.
Vector operator* (double lhs, const Vector &rhs)
Scalar multiplication is defined.
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)
Vector operator/ (const Vector &lhs, double rhs)
Scalar division is defined.
bool operator== (const Vector &a, const Vector &b)
The literal equality operator==(), also identical.
class Rotation
void SetToZero (Vector &v)

## Detailed Description

A concrete implementation of a 3 dimensional vector class.

Definition at line 160 of file frames.hpp.

## Constructor & Destructor Documentation

 KDL::Vector::Vector ( ) [inline]

Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.

Definition at line 165 of file frames.hpp.

 KDL::Vector::Vector ( double x, double y, double z ) [inline]

Constructs a vector out of the three values x, y and z.

 KDL::Vector::Vector ( const Vector & arg ) [inline]

Assignment operator. The normal copy by value semantics.

## Member Function Documentation

 double KDL::Vector::Norm ( ) const
Returns:
the norm of the vector

Definition at line 111 of file frames.cpp.

 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.

Definition at line 141 of file frames.cpp.

 double KDL::Vector::operator() ( int index ) const [inline]

Access to elements, range checked when NDEBUG is not set, from 0..2.

 double& KDL::Vector::operator() ( int index ) [inline]

Access to elements, range checked when NDEBUG is not set, from 0..2.

 Vector& KDL::Vector::operator+= ( const Vector & arg ) [inline]

Adds a vector from the Vector object itself.

 Vector& KDL::Vector::operator-= ( const Vector & arg ) [inline]

subtracts a vector from the Vector object itself

 Vector& KDL::Vector::operator= ( const Vector & arg ) [inline]

Assignment operator. The normal copy by value semantics.

 double KDL::Vector::operator[] ( int index ) const [inline]

Equivalent to double operator()(int index) const.

Definition at line 183 of file frames.hpp.

 double& KDL::Vector::operator[] ( int index ) [inline]

Equivalent to double& operator()(int index)

Definition at line 189 of file frames.hpp.

 void KDL::Vector::ReverseSign ( ) [inline]

Reverses the sign of the Vector object itself.

 void KDL::Vector::Set2DPlane ( const Frame & F_someframe_XY, const Vector2 & v_XY ) [inline]

a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.

 void KDL::Vector::Set2DXY ( const Vector2 & v ) [inline]

a 3D vector where the 2D vector v is put in the XY plane

 void KDL::Vector::Set2DYZ ( const Vector2 & v ) [inline]

a 3D vector where the 2D vector v is put in the YZ plane

 void KDL::Vector::Set2DZX ( const Vector2 & v ) [inline]

a 3D vector where the 2D vector v is put in the ZX plane

 double KDL::Vector::x ( ) const [inline]
 void KDL::Vector::x ( double ) [inline]
 double KDL::Vector::y ( ) const [inline]
 void KDL::Vector::y ( double ) [inline]
 double KDL::Vector::z ( ) const [inline]
 void KDL::Vector::z ( double ) [inline]
 static Vector KDL::Vector::Zero ( ) [inline, static]
Returns:
a zero vector

## Friends And Related Function Documentation

 double dot ( const Vector & lhs, const Vector & rhs ) [friend]
 bool Equal ( const Vector & a, const Vector & b, double eps ) [friend]

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 class Frame [friend]

Definition at line 264 of file frames.hpp.

 bool operator!= ( const Vector & a, const Vector & b ) [friend]

The literal inequality operator!=().

 Vector operator* ( const Vector & lhs, double rhs ) [friend]

Scalar multiplication is defined.

 Vector operator* ( double lhs, const Vector & rhs ) [friend]

Scalar multiplication is defined.

 Vector operator* ( const Vector & lhs, const Vector & rhs ) [friend]
 Vector operator+ ( const Vector & lhs, const Vector & rhs ) [friend]
 Vector operator- ( const Vector & lhs, const Vector & rhs ) [friend]
 Vector operator- ( const Vector & arg ) [friend]
 Vector operator/ ( const Vector & lhs, double rhs ) [friend]

Scalar division is defined.

 bool operator== ( const Vector & a, const Vector & b ) [friend]

The literal equality operator==(), also identical.

 friend class Rotation [friend]

Definition at line 263 of file frames.hpp.

 void SetToZero ( Vector & v ) [friend]

To have a uniform operator to put an element to zero, for scalar values and for objects.

## Member Data Documentation

 double KDL::Vector::data[3]

Definition at line 163 of file frames.hpp.

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

orocos_kdl
Author(s):
autogenerated on Sat Oct 7 2017 03:04:29