Blender
V3.3
|
A concrete implementation of a 3 dimensional vector class. More...
#include <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 (double *xyz) | |
Constructs a vector out of an array of three values x, y and z. More... | |
Vector (float *xyz) | |
Constructs a vector out of an array of three values x, y and z. More... | |
Vector (const Vector &arg) | |
Assignment operator. The normal copy by value semantics. More... | |
void | GetValue (double *xyz) const |
store vector components in array 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... | |
Vector & | operator*= (double arg) |
Multiply by a scalar. More... | |
double | Normalize (double eps=epsilon) |
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) |
bool | Equal (const Vector &a, const Vector &b, double eps) |
Vector | Normalize (const Vector &a, double eps) |
return a normalized vector 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.
Definition at line 142 of file frames.hpp.
|
inline |
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.
Definition at line 147 of file frames.hpp.
References data.
Referenced by Normalize().
Constructs a vector out of an array of three values x, y and z.
Definition at line 41 of file frames.inl.
References data.
Constructs a vector out of an array of three values x, y and z.
Definition at line 46 of file frames.inl.
References data.
Assignment operator. The normal copy by value semantics.
Definition at line 29 of file frames.inl.
store vector components in array
Definition at line 51 of file frames.inl.
References data.
Referenced by GetJointRotation().
double KDL::Vector::Norm | ( | ) | const |
Definition at line 115 of file frames.cpp.
References data, fabs(), KDL::sqr(), and KDL::sqrt().
Referenced by convert_tree(), iTaSC::Armature::finalize(), iTaSC::Armature::getMaxEndEffectorChange(), KDL::Rotation::GetRot(), KDL::Frame::Integrate(), and Normalize().
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 145 of file frames.cpp.
References eps, Norm(), v, and Vector().
Referenced by KDL::Rotation::Rot().
|
inline |
Access to elements, range checked when NDEBUG is not set, from 0..2.
Definition at line 164 of file frames.inl.
References data, and FRAMES_CHECKI.
|
inline |
Access to elements, range checked when NDEBUG is not set, from 0..2.
Definition at line 159 of file frames.inl.
References data, and FRAMES_CHECKI.
Referenced by operator[]().
Adds a vector from the Vector object itself.
Definition at line 128 of file frames.inl.
subtracts a vector from the Vector object itself
Definition at line 137 of file frames.inl.
Assignment operator. The normal copy by value semantics.
Definition at line 57 of file frames.inl.
|
inline |
Equivalent to double& operator()(int index)
Definition at line 180 of file frames.hpp.
References operator()().
|
inline |
Equivalent to double operator()(int index) const.
Definition at line 174 of file frames.hpp.
References operator()().
|
inline |
Reverses the sign of the Vector object itself.
Definition at line 449 of file frames.inl.
References data.
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.
Definition at line 740 of file frames.inl.
References Set2DXY().
a 3D vector where the 2D vector v is put in the XY plane
Definition at line 467 of file frames.inl.
Referenced by Set2DPlane().
a 3D vector where the 2D vector v is put in the YZ plane
Definition at line 475 of file frames.inl.
a 3D vector where the 2D vector v is put in the ZX plane
Definition at line 484 of file frames.inl.
Definition at line 83 of file frames.inl.
References data.
Referenced by iTaSC::MovingFrame::updateJacobian().
Definition at line 84 of file frames.inl.
References data.
Referenced by iTaSC::MovingFrame::updateJacobian().
Definition at line 85 of file frames.inl.
References data.
Referenced by iTaSC::MovingFrame::updateJacobian().
|
inlinestatic |
Definition at line 154 of file frames.inl.
Referenced by KDL::Frame::Identity(), KDL::operator>>(), and SetToZero().
Referenced by btQuaternion::farthest(), btQuaternion::nearest(), and SegmentSqrDistance().
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 |
Definition at line 261 of file frames.hpp.
The literal inequality operator!=().
The literal equality operator==(), also identical.
|
friend |
Definition at line 260 of file frames.hpp.
To have a uniform operator to put an element to zero, for scalar values and for objects.
double KDL::Vector::data[3] |
Definition at line 145 of file frames.hpp.
Referenced by KDL::Rotation::GetRot(), KDL::Frame::getValue(), Norm(), operator+=(), operator-=(), operator=(), ReverseSign(), Set2DXY(), Set2DYZ(), Set2DZX(), KDL::Frame::setValue(), and Vector().