Public Member Functions | Static Public Member Functions | Private Attributes | Friends
KDL::Vector2 Class Reference

2D version of Vector 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..1.
double & operator() (int index)
 Access to elements, range checked when NDEBUG is not set, from 0..1.
Vector2operator+= (const Vector2 &arg)
Vector2operator-= (const Vector2 &arg)
Vector2operator= (const Vector2 &arg)
double operator[] (int index) const
 Equivalent to double operator()(int index) const.
double & operator[] (int index)
 Equivalent to double& operator()(int index)
void ReverseSign ()
void Set3DPlane (const Frame &F_someframe_XY, const Vector &v_someframe)
void Set3DXY (const Vector &v)
 projects v in its XY plane, and sets *this to these values
void Set3DYZ (const Vector &v)
 projects v in its YZ plane, and sets *this to these values
void Set3DZX (const Vector &v)
 projects v in its ZX plane, and sets *this to these values
 Vector2 ()
 Does not initialise to Zero().
 Vector2 (double x, double y)
 Vector2 (const Vector2 &arg)
double x () const
void x (double)
double y () const
void y (double)

Static Public Member Functions

static Vector2 Zero ()

Private Attributes

double data [2]

Friends

bool Equal (const Vector2 &a, const Vector2 &b, double eps)
bool operator!= (const Vector2 &a, const Vector2 &b)
 The literal inequality operator!=().
Vector2 operator* (const Vector2 &lhs, double rhs)
Vector2 operator* (double lhs, const Vector2 &rhs)
Vector2 operator* (const Vector2 &lhs, const Vector2 &rhs)
Vector2 operator+ (const Vector2 &lhs, const Vector2 &rhs)
Vector2 operator- (const Vector2 &lhs, const Vector2 &rhs)
Vector2 operator- (const Vector2 &arg)
Vector2 operator/ (const Vector2 &lhs, double rhs)
bool operator== (const Vector2 &a, const Vector2 &b)
 The literal equality operator==(), also identical.
class Rotation2
void SetToZero (Vector2 &v)

Detailed Description

2D version of Vector

Definition at line 959 of file frames.hpp.


Constructor & Destructor Documentation

KDL::Vector2::Vector2 ( ) [inline]

Does not initialise to Zero().

Definition at line 964 of file frames.hpp.

KDL::Vector2::Vector2 ( double  x,
double  y 
) [inline]
KDL::Vector2::Vector2 ( const Vector2 arg) [inline]

Member Function Documentation

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

Definition at line 87 of file frames.cpp.

double KDL::Vector2::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 98 of file frames.cpp.

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

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

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

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

Vector2& KDL::Vector2::operator+= ( const Vector2 arg) [inline]
Vector2& KDL::Vector2::operator-= ( const Vector2 arg) [inline]
Vector2& KDL::Vector2::operator= ( const Vector2 arg) [inline]
double KDL::Vector2::operator[] ( int  index) const [inline]

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

Definition at line 977 of file frames.hpp.

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

Equivalent to double& operator()(int index)

Definition at line 983 of file frames.hpp.

void KDL::Vector2::ReverseSign ( ) [inline]
void KDL::Vector2::Set3DPlane ( const Frame F_someframe_XY,
const Vector v_someframe 
) [inline]

projects v_someframe in the XY plane of F_someframe_XY, and sets *this to these values expressed wrt someframe.

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

projects v in its XY plane, and sets *this to these values

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

projects v in its YZ plane, and sets *this to these values

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

projects v in its ZX plane, and sets *this to these values

double KDL::Vector2::x ( ) const [inline]
void KDL::Vector2::x ( double  ) [inline]
double KDL::Vector2::y ( ) const [inline]
void KDL::Vector2::y ( double  ) [inline]
static Vector2 KDL::Vector2::Zero ( ) [inline, static]
Returns:
a zero 2D vector.

Friends And Related Function Documentation

bool Equal ( const Vector2 a,
const Vector2 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

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

The literal inequality operator!=().

Vector2 operator* ( const Vector2 lhs,
double  rhs 
) [friend]
Vector2 operator* ( double  lhs,
const Vector2 rhs 
) [friend]
Vector2 operator* ( const Vector2 lhs,
const Vector2 rhs 
) [friend]
Vector2 operator+ ( const Vector2 lhs,
const Vector2 rhs 
) [friend]
Vector2 operator- ( const Vector2 lhs,
const Vector2 rhs 
) [friend]
Vector2 operator- ( const Vector2 arg) [friend]
Vector2 operator/ ( const Vector2 lhs,
double  rhs 
) [friend]
bool operator== ( const Vector2 a,
const Vector2 b 
) [friend]

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

friend class Rotation2 [friend]

Definition at line 1044 of file frames.hpp.

void SetToZero ( Vector2 v) [friend]

Member Data Documentation

double KDL::Vector2::data[2] [private]

Definition at line 961 of file frames.hpp.


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


orocos_kdl
Author(s):
autogenerated on Mon Oct 6 2014 03:11:17