orocos_kdl
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
KDL::Vector2 Class Reference

2D version of Vector More...

#include <frames.hpp>

Public Member Functions

double Norm (double eps=epsilon) const
 
double Normalize (double eps=epsilon)
 
double & operator() (int index)
 Access to elements, range checked when NDEBUG is not set, from 0..1. More...
 
double operator() (int index) const
 Access to elements, range checked when NDEBUG is not set, from 0..1. More...
 
Vector2operator+= (const Vector2 &arg)
 
Vector2operator-= (const Vector2 &arg)
 
Vector2operator= (const Vector2 &arg)
 
double & operator[] (int index)
 Equivalent to double& operator()(int index) More...
 
double operator[] (int index) const
 Equivalent to double operator()(int index) const. More...
 
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 More...
 
void Set3DYZ (const Vector &v)
 projects v in its YZ plane, and sets *this to these values More...
 
void Set3DZX (const Vector &v)
 projects v in its ZX plane, and sets *this to these values More...
 
 Vector2 ()
 Does not initialise to Zero(). More...
 
 Vector2 (const Vector2 &arg)
 
 Vector2 (double x, double y)
 
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!=(). More...
 
Vector2 operator* (const Vector2 &lhs, const Vector2 &rhs)
 
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 &arg)
 
Vector2 operator- (const Vector2 &lhs, const Vector2 &rhs)
 
Vector2 operator/ (const Vector2 &lhs, double rhs)
 
bool operator== (const Vector2 &a, const Vector2 &b)
 The literal equality operator==(), also identical. More...
 
class Rotation2
 
void SetToZero (Vector2 &v)
 

Detailed Description

2D version of Vector

Definition at line 960 of file frames.hpp.

Constructor & Destructor Documentation

◆ Vector2() [1/3]

KDL::Vector2::Vector2 ( )
inline

Does not initialise to Zero().

Definition at line 965 of file frames.hpp.

◆ Vector2() [2/3]

IMETHOD Vector2::Vector2 ( double  x,
double  y 
)
inline

Definition at line 731 of file frames.inl.

◆ Vector2() [3/3]

IMETHOD Vector2::Vector2 ( const Vector2 arg)
inline

Definition at line 725 of file frames.inl.

Member Function Documentation

◆ Norm()

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

Definition at line 112 of file frames.cpp.

◆ Normalize()

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 129 of file frames.cpp.

◆ operator()() [1/2]

IMETHOD double & Vector2::operator() ( int  index)
inline

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

Definition at line 793 of file frames.inl.

◆ operator()() [2/2]

IMETHOD double Vector2::operator() ( int  index) const
inline

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

Definition at line 788 of file frames.inl.

◆ operator+=()

IMETHOD Vector2 & Vector2::operator+= ( const Vector2 arg)
inline

Definition at line 770 of file frames.inl.

◆ operator-=()

IMETHOD Vector2 & Vector2::operator-= ( const Vector2 arg)
inline

Definition at line 777 of file frames.inl.

◆ operator=()

IMETHOD Vector2 & Vector2::operator= ( const Vector2 arg)
inline

Definition at line 737 of file frames.inl.

◆ operator[]() [1/2]

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

Equivalent to double& operator()(int index)

Definition at line 984 of file frames.hpp.

◆ operator[]() [2/2]

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

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

Definition at line 978 of file frames.hpp.

◆ ReverseSign()

IMETHOD void Vector2::ReverseSign ( )
inline

Definition at line 806 of file frames.inl.

◆ Set3DPlane()

IMETHOD void 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.

Definition at line 838 of file frames.inl.

◆ Set3DXY()

IMETHOD void Vector2::Set3DXY ( const Vector v)
inline

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

Definition at line 819 of file frames.inl.

◆ Set3DYZ()

IMETHOD void Vector2::Set3DYZ ( const Vector v)
inline

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

Definition at line 825 of file frames.inl.

◆ Set3DZX()

IMETHOD void Vector2::Set3DZX ( const Vector v)
inline

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

Definition at line 831 of file frames.inl.

◆ x() [1/2]

IMETHOD double Vector2::x ( ) const
inline

Definition at line 799 of file frames.inl.

◆ x() [2/2]

void KDL::Vector2::x ( double  )
inline

◆ y() [1/2]

IMETHOD double Vector2::y ( ) const
inline

Definition at line 800 of file frames.inl.

◆ y() [2/2]

void KDL::Vector2::y ( double  )
inline

◆ Zero()

IMETHOD Vector2 Vector2::Zero ( )
inlinestatic
Returns
a zero 2D vector.

Definition at line 784 of file frames.inl.

Friends And Related Function Documentation

◆ Equal

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

◆ operator!=

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

The literal inequality operator!=().

◆ operator* [1/3]

Vector2 operator* ( const Vector2 lhs,
const Vector2 rhs 
)
friend

◆ operator* [2/3]

Vector2 operator* ( const Vector2 lhs,
double  rhs 
)
friend

◆ operator* [3/3]

Vector2 operator* ( double  lhs,
const Vector2 rhs 
)
friend

◆ operator+

Vector2 operator+ ( const Vector2 lhs,
const Vector2 rhs 
)
friend

◆ operator- [1/2]

Vector2 operator- ( const Vector2 arg)
friend

◆ operator- [2/2]

Vector2 operator- ( const Vector2 lhs,
const Vector2 rhs 
)
friend

◆ operator/

Vector2 operator/ ( const Vector2 lhs,
double  rhs 
)
friend

◆ operator==

bool operator== ( const Vector2 a,
const Vector2 b 
)
friend

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

◆ Rotation2

friend class Rotation2
friend

Definition at line 1045 of file frames.hpp.

◆ SetToZero

void SetToZero ( Vector2 v)
friend

Member Data Documentation

◆ data

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

Definition at line 962 of file frames.hpp.


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