Create and play with a Position6D. More...
#include <alposition6d.h>
Public Member Functions | |
Position6D () | |
Create a Position6D initialized with 0.0f. | |
Position6D (float pInit) | |
Create a Position6D initialized with the same float. | |
Position6D (float pX, float pY, float pZ, float pWx, float pWy, float pWz) | |
Create a Position6D initialized with explicit value. | |
Position6D (const std::vector< float > &pFloats) | |
Create a Position6D with an std::vector. | |
Position6D | operator+ (const Position6D &pPos2) const |
Overloading of operator + for Position6D. | |
Position6D | operator- (const Position6D &pPos2) const |
Overloading of operator - for Position6D. | |
Position6D | operator+ () const |
Overloading of operator + for Position6D. | |
Position6D | operator- () const |
Overloading of operator - for Position6D. | |
Position6D & | operator+= (const Position6D &pPos2) |
Overloading of operator += for Position6D. | |
Position6D & | operator-= (const Position6D &pPos2) |
Overloading of operator -= for Position6D. | |
bool | operator== (const Position6D &pPos2) const |
Overloading of operator == for Position6D. | |
bool | operator!= (const Position6D &pPos2) const |
Overloading of operator != for Position6D. | |
Position6D | operator* (float pVal) const |
Overloading of operator * for Position6D. | |
Position6D | operator/ (float pVal) const |
Overloading of operator / for Position6D. | |
Position6D & | operator*= (float pVal) |
Overloading of operator *= for Position6D. | |
Position6D & | operator/= (float pVal) |
Overloading of operator /= for Position6D. | |
bool | isNear (const Position6D &pPos2, const float &pEpsilon=0.0001f) const |
Check if the actual Position6D is near the one given in argument. | |
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: | |
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: | |
float | norm () const |
Compute the norm of the actual Position6D: | |
std::vector< float > | toVector () const |
Return the Position6D as a vector of float [x, y, z, wx, wy, wz]. |
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 |
Compute the norm of the actual Position6D:
bool AL::Math::Position6D::operator!= | ( | const Position6D & | pPos2 | ) | const |
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 |
Position6D AL::Math::Position6D::operator+ | ( | const Position6D & | pPos2 | ) | const |
Overloading of operator + for Position6D.
pPos2 | the second Position6D |
Position6D AL::Math::Position6D::operator+ | ( | ) | const |
Overloading of operator + for Position6D.
Position6D& AL::Math::Position6D::operator+= | ( | const Position6D & | pPos2 | ) |
Overloading of operator += for Position6D.
pPos2 | the second Position6D |
Position6D AL::Math::Position6D::operator- | ( | const Position6D & | pPos2 | ) | const |
Overloading of operator - for Position6D.
pPos2 | the second Position6D |
Position6D AL::Math::Position6D::operator- | ( | ) | const |
Overloading of operator - for Position6D.
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 |
std::vector<float> AL::Math::Position6D::toVector | ( | ) | 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.