|
libalmath
2.5.7.1
|
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 |
Create and play with a Position6D.
A Position6D is just defined by x, y, z, wx, wy and wz.
Definition at line 23 of file alposition6d.h.
| AL::Math::Position6D::Position6D | ( | ) |
Create a Position6D initialized with 0.0f.
![$ \left[\begin{array}{c} x \\ y \\ z \\ wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} 0.0 \\ 0.0 \\ 0.0 \\ 0.0 \\ 0.0 \\ 0.0 \end{array}\right]$](form_59.png)
|
explicit |
Create a Position6D initialized with the same float.
![$ \left[\begin{array}{c} x \\ y \\ z \\ wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pInit \\ pInit \\ pInit \\ pInit \\ pInit \\ pInit \end{array}\right]$](form_60.png)
| 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.
![$ \left[\begin{array}{c} x \\ y \\ z \\ wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pX \\ pY \\ pZ \\ pWx \\ pWy \\ pWz \end{array}\right]$](form_61.png)
| 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.
![$ \left[\begin{array}{c} x \\ y \\ z \\ wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pFloats[0] \\ pFloats[1] \\ pFloats[2] \\ pFloats[3] \\ pFloats[4] \\ pFloats[5] \end{array}\right]$](form_62.png)
| pFloats | An std::vector<float> of size 6 for respectively: x, y, z, wx, wy and wz |
| 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:
| pPos2 | the second 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:
| pPos2 | the second 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.
| pPos2 | the second Position6D |
| pEpsilon | an optional epsilon distance |
| float AL::Math::Position6D::norm | ( | ) | const |
| bool AL::Math::Position6D::operator!= | ( | const Position6D & | pPos2 | ) | const |
Overloading of operator != for Position6D.
| pPos2 | the second Position6D |
|
inline |
Overloading of operator * for Position6D.
| pVal | the float factor |
Definition at line 225 of file alposition6d.h.
| Position6D& AL::Math::Position6D::operator*= | ( | float | pVal | ) |
Overloading of operator *= for Position6D.
| pVal | the float factor |
|
inline |
Overloading of operator + for Position6D.
| pPos2 | the second Position6D |
Definition at line 155 of file alposition6d.h.
|
inline |
Overloading of operator + for Position6D.
Definition at line 184 of file alposition6d.h.
| Position6D& AL::Math::Position6D::operator+= | ( | const Position6D & | pPos2 | ) |
Overloading of operator += for Position6D.
| pPos2 | the second Position6D |
|
inline |
Overloading of operator - for Position6D.
| pPos2 | the second Position6D |
Definition at line 170 of file alposition6d.h.
|
inline |
Overloading of operator - for Position6D.
Definition at line 192 of file alposition6d.h.
| Position6D& AL::Math::Position6D::operator-= | ( | const Position6D & | pPos2 | ) |
Overloading of operator -= for Position6D.
| pPos2 | the second Position6D |
| Position6D AL::Math::Position6D::operator/ | ( | float | pVal | ) | const |
Overloading of operator / for Position6D.
| pVal | the float factor |
| Position6D& AL::Math::Position6D::operator/= | ( | float | pVal | ) |
Overloading of operator /= for Position6D.
| pVal | the float factor |
| bool AL::Math::Position6D::operator== | ( | const Position6D & | pPos2 | ) | const |
Overloading of operator == for Position6D.
| 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.
| float AL::Math::Position6D::wx |
Definition at line 31 of file alposition6d.h.
| float AL::Math::Position6D::wy |
Definition at line 33 of file alposition6d.h.
| float AL::Math::Position6D::wz |
Definition at line 35 of file alposition6d.h.
| float AL::Math::Position6D::x |
Definition at line 25 of file alposition6d.h.
| float AL::Math::Position6D::y |
Definition at line 27 of file alposition6d.h.
| float AL::Math::Position6D::z |
Definition at line 29 of file alposition6d.h.