- Aldebaran documentation |
- C++ Libraries |
- index

libalmath 2.8.7.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
AL::Math::Position6D Struct Reference
Types

Create and play with a Position6D. More...

`#include <alposition6d.h>`

## Public Member Functions
| Position6D ()
| Create a Position6D initialized with 0.0f. More...
| Position6D (float pInit)
| Create a Position6D initialized with the same float. More...
| Position6D (float pX, float pY, float pZ, float pWx, float pWy, float pWz)
| Create a Position6D initialized with explicit value. More...
| Position6D (const std::vector< float > &pFloats)
| Create a Position6D with an std::vector. More...
Position6D | operator+ (const Position6D &pPos2) const
| Overloading of operator + for Position6D. More...
Position6D | operator- (const Position6D &pPos2) const
| Overloading of operator - for Position6D. More...
Position6D | operator+ (void) const
| Overloading of operator + for Position6D. More...
Position6D | operator- () const
| Overloading of operator - for Position6D. More...
Position6D & | operator+= (const Position6D &pPos2)
| Overloading of operator += for Position6D. More...
Position6D & | operator-= (const Position6D &pPos2)
| Overloading of operator -= for Position6D. More...
bool | operator== (const Position6D &pPos2) const
| Overloading of operator == for Position6D. More...
bool | operator!= (const Position6D &pPos2) const
| Overloading of operator != for Position6D. More...
Position6D | operator* (float pVal) const
| Overloading of operator * for Position6D. More...
Position6D | operator/ (float pVal) const
| Overloading of operator / for Position6D. More...
Position6D & | operator*= (float pVal)
| Overloading of operator *= for Position6D. More...
Position6D & | operator/= (float pVal)
| Overloading of operator /= for Position6D. More...
bool | isNear (const Position6D &pPos2, const float &pEpsilon=0.0001f) const
| Check if the actual Position6D is near the one given in argument. More...
float | distanceSquared (const Position6D &pPos2) const
| Compute the squared distance of translation part (x, y and z) between the actual Position6D and the one give in argument: More...
float | distance (const Position6D &pPos2) const
| Compute the distance of translation part (x, y and z) between the actual Position6D and the one give in argument: More...
float | norm () const
| Compute the norm of the actual Position6D: More...
void | toVector (std::vector< float > &pReturnVector) const
| Return the Position6D as a vector of float [x, y, z, wx, wy, wz]. More...
std::vector< float > | toVector (void) const
void | writeToVector (std::vector< float >::iterator &pIt) const
| Write [x, y, z, wx, wy, wz] in the vector and update the iterator. It is assumed the vector has enough space. More...

## Public Attributes
float | x
float | y
float | z
float | wx
float | wy
float | wz

## Detailed Description

Create and play with a Position6D.

A Position6D is just defined by x, y, z, wx, wy and wz.

Definition at line 24 of file alposition6d.h.

## Constructor & Destructor Documentation

AL::Math::Position6D::Position6D | ( |  | ) |

Create a Position6D initialized with 0.0f.

AL::Math::Position6D::Position6D | ( | float | pInit | ) |
| explicit

Create a Position6D initialized with the same float.

Parameters

  pInit | the float value for each member

AL::Math::Position6D::Position6D | ( | float | pX,
|  | float | pY,
|  | float | pZ,
|  | float | pWx,
|  | float | pWy,
|  | float | pWz
| ) |  |

Create a Position6D initialized with explicit value.

Parameters

  pX | the float value for x
  pY | the float value for y
  pZ | the float value for z
  pWx | the float value for wx
  pWy | the float value for wy
  pWz | the float value for wz

AL::Math::Position6D::Position6D | ( | const std::vector< float > & | pFloats | ) |

Create a Position6D with an std::vector.

Parameters

  pFloats | An std::vector<float> of size 6 for respectively: x, y, z, wx, wy and wz

## Member Function Documentation

float AL::Math::Position6D::distance | ( | const Position6D & | pPos2 | ) | const

Compute the distance of translation part (x, y and z) between the actual Position6D and the one give in argument:

Parameters

  pPos2 | the second Position6D

Returns
  the float distance between the two Position6D

float AL::Math::Position6D::distanceSquared | ( | const Position6D & | pPos2 | ) | const

Compute the squared distance of translation part (x, y and z) between the actual Position6D and the one give in argument:

Parameters

  pPos2 | the second Position6D

Returns
  the float squared distance between the two Position6D

bool AL::Math::Position6D::isNear | ( | const Position6D & | pPos2,
|  | const float & | pEpsilon = `0.0001f`
| ) |  | const

Check if the actual Position6D is near the one given in argument.

Parameters

  pPos2 | the second Position6D
  pEpsilon | an optional epsilon distance

Returns
  true if the difference of each float of the two Position6D is less than pEpsilon

float AL::Math::Position6D::norm | ( |  | ) | const

Compute the norm of the actual Position6D:

Returns
  the float norm of the Position6D

bool AL::Math::Position6D::operator!= | ( | const Position6D & | pPos2 | ) | const

Overloading of operator != for Position6D.

Parameters

  pPos2 | the second Position6D

Position6D AL::Math::Position6D::operator* | ( | float | pVal | ) | const
| inline

Overloading of operator * for Position6D.

Parameters

  pVal | the float factor

Definition at line 226 of file alposition6d.h.

Position6D& AL::Math::Position6D::operator*= | ( | float | pVal | ) |

Overloading of operator *= for Position6D.

Parameters

  pVal | the float factor

Position6D AL::Math::Position6D::operator+ | ( | const Position6D & | pPos2 | ) | const
| inline

Overloading of operator + for Position6D.

Parameters

  pPos2 | the second Position6D

Definition at line 156 of file alposition6d.h.

Position6D AL::Math::Position6D::operator+ | ( | void |  | ) | const
| inline

Overloading of operator + for Position6D.

Definition at line 185 of file alposition6d.h.

Position6D& AL::Math::Position6D::operator+= | ( | const Position6D & | pPos2 | ) |

Overloading of operator += for Position6D.

Parameters

  pPos2 | the second Position6D

Position6D AL::Math::Position6D::operator- | ( | const Position6D & | pPos2 | ) | const
| inline

Overloading of operator - for Position6D.

Parameters

  pPos2 | the second Position6D

Definition at line 171 of file alposition6d.h.

Position6D AL::Math::Position6D::operator- | ( |  | ) | const
| inline

Overloading of operator - for Position6D.

Definition at line 193 of file alposition6d.h.

Position6D& AL::Math::Position6D::operator-= | ( | const Position6D & | pPos2 | ) |

Overloading of operator -= for Position6D.

Parameters

  pPos2 | the second Position6D

Position6D AL::Math::Position6D::operator/ | ( | float | pVal | ) | const

Overloading of operator / for Position6D.

Parameters

  pVal | the float factor

Position6D& AL::Math::Position6D::operator/= | ( | float | pVal | ) |

Overloading of operator /= for Position6D.

Parameters

  pVal | the float factor

bool AL::Math::Position6D::operator== | ( | const Position6D & | pPos2 | ) | const

Overloading of operator == for Position6D.

Parameters

  pPos2 | the second Position6D

void AL::Math::Position6D::toVector | ( | std::vector< float > & | pReturnVector | ) | const

Return the Position6D as a vector of float [x, y, z, wx, wy, wz].

std::vector<float> AL::Math::Position6D::toVector | ( | void |  | ) | const

void AL::Math::Position6D::writeToVector | ( | std::vector< float >::iterator & | pIt | ) | const

Write [x, y, z, wx, wy, wz] in the vector and update the iterator. It is assumed the vector has enough space.

## Member Data Documentation

float AL::Math::Position6D::wx

Definition at line 32 of file alposition6d.h.

float AL::Math::Position6D::wy

Definition at line 34 of file alposition6d.h.

float AL::Math::Position6D::wz

Definition at line 36 of file alposition6d.h.

float AL::Math::Position6D::x

Definition at line 26 of file alposition6d.h.

float AL::Math::Position6D::y

Definition at line 28 of file alposition6d.h.

float AL::Math::Position6D::z

Definition at line 30 of file alposition6d.h.

The documentation for this struct was generated from the following file:

- /home/opennao/work/release-2.8/lib/libalmath/almath/types/alposition6d.h