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 |
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.
|
explicit |
Create a Position6D initialized with the same float.
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.
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.
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].
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.