Create and play with a Velocity3D.
More...
#include <alvelocity3d.h>
Create and play with a Velocity3D.
A Velocity3D is just defined by xd, yd and zd.
Definition at line 23 of file alvelocity3d.h.
| AL::Math::Velocity3D::Velocity3D |
( |
| ) |
|
| AL::Math::Velocity3D::Velocity3D |
( |
float |
pInit | ) |
|
|
explicit |
Create a Velocity3D initialize with the same float.
![$ \left[\begin{array}{c} xd \\ yd \\ zd \end{array}\right] = \left[\begin{array}{c} pInit \\ pInit \\ pInit \end{array}\right]$](form_110.png)
- 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.
![$ \left[\begin{array}{c} xd \\ yd \\ zd \end{array}\right] = \left[\begin{array}{c} pXd \\ pYd \\ pZd \end{array}\right]$](form_111.png)
- 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.
![$ \left[\begin{array}{c} xd \\ yd \\ zd \end{array}\right] = \left[\begin{array}{c} pFloats[0] \\ pFloats[1] \\ pFloats[2] \end{array}\right]$](form_112.png)
- Parameters
-
| pFloats | An std::vector<float> of size 3 for respectively: xd, yd, zd |
| 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 |
| Velocity3D AL::Math::Velocity3D::normalize |
( |
| ) |
const |
| bool AL::Math::Velocity3D::operator!= |
( |
const Velocity3D & |
pVel2 | ) |
const |
Overloading of operator != for Velocity3D.
- Parameters
-
| Velocity3D AL::Math::Velocity3D::operator* |
( |
const float |
pVal | ) |
const |
|
inline |
| Velocity3D& AL::Math::Velocity3D::operator*= |
( |
const float |
pVal | ) |
|
Overloading of operator *= for Velocity3D.
- Parameters
-
| Velocity3D AL::Math::Velocity3D::operator+ |
( |
void |
| ) |
const |
|
inline |
Overloading of operator += for Velocity3D.
- Parameters
-
| Velocity3D AL::Math::Velocity3D::operator- |
( |
| ) |
const |
|
inline |
Overloading of operator -= for Velocity3D.
- Parameters
-
| Velocity3D AL::Math::Velocity3D::operator/ |
( |
const float |
pVal | ) |
const |
Overloading of operator / for Velocity3D.
- Parameters
-
| Velocity3D& AL::Math::Velocity3D::operator/= |
( |
const float |
pVal | ) |
|
Overloading of operator /= for Velocity3D.
- Parameters
-
| bool AL::Math::Velocity3D::operator== |
( |
const Velocity3D & |
pVel2 | ) |
const |
Overloading of operator == for Velocity3D.
- Parameters
-
| 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.
| float AL::Math::Velocity3D::xd |
| float AL::Math::Velocity3D::yd |
| float AL::Math::Velocity3D::zd |
The documentation for this struct was generated from the following file:
- /home/opennao/work/release-2.5/lib/libalmath/almath/types/alvelocity3d.h