- 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::Velocity3D Struct Reference
Types

Create and play with a Velocity3D. More...

`#include <alvelocity3d.h>`

## Public Member Functions
| Velocity3D ()
| Create a Velocity3D initialize with 0.0f. More...
| Velocity3D (float pInit)
| Create a Velocity3D initialize with the same float. More...
| Velocity3D (float pXd, float pYd, float pZd)
| Create a Velocity3D initialize with explicit value. More...
| Velocity3D (const std::vector< float > &pFloats)
| Create a Velocity3D with an std::vector. More...
Velocity3D | operator+ (const Velocity3D &pVel2) const
| Overloading of operator + for Velocity3D. More...
Velocity3D | operator- (const Velocity3D &pVel2) const
| Overloading of operator - for Velocity3D. More...
Velocity3D | operator+ (void) const
| Overloading of operator + for Velocity3D. More...
Velocity3D | operator- () const
| Overloading of operator - for Velocity3D. More...
Velocity3D & | operator+= (const Velocity3D &pVel2)
| Overloading of operator += for Velocity3D. More...
Velocity3D & | operator-= (const Velocity3D &pVel2)
| Overloading of operator -= for Velocity3D. More...
bool | operator== (const Velocity3D &pVel2) const
| Overloading of operator == for Velocity3D. More...
bool | operator!= (const Velocity3D &pVel2) const
| Overloading of operator != for Velocity3D. More...
Velocity3D | operator* (const float pVal) const
| Overloading of operator * for Velocity3D. More...
Velocity3D | operator/ (const float pVal) const
| Overloading of operator / for Velocity3D. More...
Velocity3D & | operator*= (const float pVal)
| Overloading of operator *= for Velocity3D. More...
Velocity3D & | operator/= (const float pVal)
| Overloading of operator /= for Velocity3D. More...
bool | isNear (const Velocity3D &pVel2, const float &pEpsilon=0.0001f) const
| Check if the actual Velocity3D is Near the one given in argument. More...
float | norm () const
| Compute the norm of the actual Velocity3D: More...
Velocity3D | normalize () const
| Normalize the actual Velocity3D: More...
void | toVector (std::vector< float > &pReturnValue) const
| Return the Velocity3D as a vector of float [xd, yd, zd]. More...
std::vector< float > | toVector (void) const
void | writeToVector (std::vector< float >::iterator &pIt) const
| Write [xd, yd, zd] in the vector and update the iterator. It is assumed the vector has enough space. More...

## Public Attributes
float | xd
float | yd
float | zd

## Detailed Description

Create and play with a Velocity3D.

A Velocity3D is just defined by xd, yd and zd.

Definition at line 24 of file alvelocity3d.h.

## Constructor & Destructor Documentation

AL::Math::Velocity3D::Velocity3D | ( |  | ) |

Create a Velocity3D initialize with 0.0f.

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

Create a Velocity3D initialize with the same float.

Parameters

  pInit | the float value for each member

AL::Math::Velocity3D::Velocity3D | ( | float | pXd,
|  | float | pYd,
|  | float | pZd
| ) |  |

Create a Velocity3D initialize with explicit value.

Parameters

  pXd | the float value for xd
  pYd | the float value for yd
  pZd | the float value for zd

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

Create a Velocity3D with an std::vector.

Parameters

  pFloats | An std::vector<float> of size 3 for respectively: xd, yd, zd

## Member Function Documentation

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

Check if the actual Velocity3D is Near the one given in argument.

Parameters

  pVel2 | the second Velocity3D
  pEpsilon | an optional epsilon distance

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

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

Compute the norm of the actual Velocity3D:

Returns
  the float norm of the Velocity3D

Velocity3D AL::Math::Velocity3D::normalize | ( |  | ) | const

Normalize the actual Velocity3D:

Returns
  the Velocity3D normalized

bool AL::Math::Velocity3D::operator!= | ( | const Velocity3D & | pVel2 | ) | const

Overloading of operator != for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

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

Overloading of operator * for Velocity3D.

Parameters

  pVal | the float factor

Definition at line 181 of file alvelocity3d.h.

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

Overloading of operator *= for Velocity3D.

Parameters

  pVal | the float factor

Velocity3D AL::Math::Velocity3D::operator+ | ( | const Velocity3D & | pVel2 | ) | const
| inline

Overloading of operator + for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

Definition at line 120 of file alvelocity3d.h.

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

Overloading of operator + for Velocity3D.

Definition at line 140 of file alvelocity3d.h.

Velocity3D& AL::Math::Velocity3D::operator+= | ( | const Velocity3D & | pVel2 | ) |

Overloading of operator += for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

Velocity3D AL::Math::Velocity3D::operator- | ( | const Velocity3D & | pVel2 | ) | const
| inline

Overloading of operator - for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

Definition at line 129 of file alvelocity3d.h.

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

Overloading of operator - for Velocity3D.

Definition at line 148 of file alvelocity3d.h.

Velocity3D& AL::Math::Velocity3D::operator-= | ( | const Velocity3D & | pVel2 | ) |

Overloading of operator -= for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

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

Overloading of operator / for Velocity3D.

Parameters

  pVal | the float factor

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

Overloading of operator /= for Velocity3D.

Parameters

  pVal | the float factor

bool AL::Math::Velocity3D::operator== | ( | const Velocity3D & | pVel2 | ) | const

Overloading of operator == for Velocity3D.

Parameters

  pVel2 | the second Velocity3D

void AL::Math::Velocity3D::toVector | ( | std::vector< float > & | pReturnValue | ) | const

Return the Velocity3D as a vector of float [xd, yd, zd].

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

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

Write [xd, yd, zd] in the vector and update the iterator. It is assumed the vector has enough space.

## Member Data Documentation

float AL::Math::Velocity3D::xd

Definition at line 26 of file alvelocity3d.h.

float AL::Math::Velocity3D::yd

Definition at line 28 of file alvelocity3d.h.

float AL::Math::Velocity3D::zd

Definition at line 30 of file alvelocity3d.h.

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

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