Blender  V3.3
Public Member Functions | Static Public Member Functions | Friends | List of all members
KDL::Vector2 Class Reference

2D version of Vector More...

#include <frames.hpp>

Public Member Functions

 Vector2 ()
 Does not initialise to Zero(). More...
 
 Vector2 (double x, double y)
 
 Vector2 (const Vector2 &arg)
 
 Vector2 (double *xyz)
 
 Vector2 (float *xyz)
 
Vector2operator= (const Vector2 &arg)
 
double operator() (int index) const
 Access to elements, range checked when NDEBUG is not set, from 0..1. More...
 
doubleoperator() (int index)
 Access to elements, range checked when NDEBUG is not set, from 0..1. More...
 
void GetValue (double *xy) const
 store vector components in array More...
 
void ReverseSign ()
 
Vector2operator-= (const Vector2 &arg)
 
Vector2operator+= (const Vector2 &arg)
 
double Normalize (double eps=epsilon)
 
double Norm () const
 
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...
 
void Set3DPlane (const Frame &F_someframe_XY, const Vector &v_someframe)
 

Static Public Member Functions

static Vector2 Zero ()
 

Friends

class Rotation2
 
Vector2 operator* (const Vector2 &lhs, double rhs)
 
Vector2 operator* (double lhs, const Vector2 &rhs)
 
Vector2 operator/ (const Vector2 &lhs, double 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)
 
void SetToZero (Vector2 &v)
 
bool Equal (const Vector2 &a, const Vector2 &b, double eps)
 

Detailed Description

2D version of Vector

Definition at line 915 of file frames.hpp.

Constructor & Destructor Documentation

◆ Vector2() [1/5]

KDL::Vector2::Vector2 ( )
inline

Does not initialise to Zero().

Definition at line 920 of file frames.hpp.

References data.

Referenced by Normalize(), and Zero().

◆ Vector2() [2/5]

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

Definition at line 764 of file frames.inl.

References x, and y.

◆ Vector2() [3/5]

IMETHOD Vector2::Vector2 ( const Vector2 arg)
inline

Definition at line 758 of file frames.inl.

◆ Vector2() [4/5]

KDL::Vector2::Vector2 ( double xyz)
inline

◆ Vector2() [5/5]

KDL::Vector2::Vector2 ( float xyz)
inline

Member Function Documentation

◆ GetValue()

IMETHOD void Vector2::GetValue ( double xy) const
inline

store vector components in array

Definition at line 786 of file frames.inl.

References xy.

Referenced by GetJointRotation().

◆ Norm()

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

Definition at line 87 of file frames.cpp.

References fabs(), KDL::sqr(), and KDL::sqrt().

Referenced by Normalize().

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

References eps, Norm(), v, and Vector2().

Referenced by KDL::Rotation::GetXZRot().

◆ 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 839 of file frames.inl.

References FRAMES_CHECKI.

◆ 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 834 of file frames.inl.

References FRAMES_CHECKI.

◆ operator+=()

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

Definition at line 816 of file frames.inl.

◆ operator-=()

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

Definition at line 823 of file frames.inl.

◆ operator=()

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

Definition at line 779 of file frames.inl.

◆ ReverseSign()

IMETHOD void Vector2::ReverseSign ( )
inline

Definition at line 844 of file frames.inl.

Referenced by KDL::Frame2::SetInverse().

◆ 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 876 of file frames.inl.

References KDL::Frame::Inverse().

◆ Set3DXY()

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

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

Definition at line 857 of file frames.inl.

References v.

◆ Set3DYZ()

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

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

Definition at line 863 of file frames.inl.

References v.

◆ Set3DZX()

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

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

Definition at line 869 of file frames.inl.

References v.

◆ Zero()

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

Definition at line 830 of file frames.inl.

References Vector2().

Referenced by KDL::Frame2::Frame2(), KDL::Frame2::SetIdentity(), and SetToZero().

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* [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

◆ Rotation2

friend class Rotation2
friend

Definition at line 983 of file frames.hpp.

◆ SetToZero

void SetToZero ( Vector2 v)
friend

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