- Aldebaran documentation |
- C++ Libraries |
- index

libalmath 2.8.7.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
Types

## Classes
struct | AL::Math::Pose2D
| A pose in a 2-dimentional space. More...
struct | AL::Math::Position2D
| Create and play with a Position2D. More...
struct | AL::Math::Position3D
| Create and play with a Position3D. More...
struct | AL::Math::Position6D
| Create and play with a Position6D. More...
struct | AL::Math::PositionAndVelocity
| Create and play with a PositionAndVelocity. More...
struct | AL::Math::Quaternion
| Create and play with a Quaternion. More...
struct | AL::Math::Rotation
| A 3*3 rotation matrix. More...
struct | AL::Math::Rotation3D
| A Rotation3D give 3 composed angles in radians. More...
struct | AL::Math::Transform
| A homogenous transformation matrix. More...
struct | AL::Math::Velocity3D
| Create and play with a Velocity3D. More...
struct | AL::Math::Velocity6D
| Create and play with a Velocity6D. More...
struct | AL::Math::Point2Di
| Create a Point2Di. Point2Di are used on objects that deal with pixels only, and should not care about metric distances. More...
struct | AL::Math::Pose2Di
| Create a Pose2Di. Pose2Di are used on objects that deal with pixels only, and should not care about metric distances. More...
struct | AL::Math::OccupancyMapParams
| Create a OccupancyMapParams. OccupancyMapParams are used used to define occupancy maps and to provide helpers to change from metrical to pixel frames. Maps are squared. More...

## Typedefs
typedef std::bitset< 6 > | AL::Math::AXIS_MASK
| Definition of an AXIS_MASK as a bit set. More...

## Functions
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Pose2D &pPos)
| Overloading of operator << for Pose2D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Position2D &pPos)
| Overloading of operator << for Position2D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Position3D &pPos)
| Overloading of operator << for Position3D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Position6D &pPos)
| Overloading of operator << for Position6D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const PositionAndVelocity &pPosVel)
| Overloading of operator << for PositionAndVelocity. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Rotation &pRot)
| Overloading of operator << for Rotation. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Rotation3D &pRot)
| Overloading of operator << for Rotation3D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Transform &pT)
| Overloading of operator << for Transform. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const TransformAndVelocity6D &pTV)
| Overloading of operator << for TransformAndVelocity6D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Velocity3D &pVel)
| Overloading of operator << for Velocity3D. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Quaternion &pQua)
| Overloading of operator << for Quaternion. More...
ALMATH_API std::ostream & | AL::Math::operator<< (std::ostream &pStream, const Velocity6D &pVel)
| Overloading of operator << for Velocity6D. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Position3D &pPos)
| Create a string of Position3D. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Rotation3D &pPos)
| Create a string of Rotation3D. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Velocity6D &pVel)
| Create a string of Velocity6D. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Transform &pT)
| Create a string of Transform. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Position6D &pPos)
| Create a string of Position6D. More...
ALMATH_API std::string | AL::Math::toSpaceSeparated (const Quaternion &pQuat)
| Create a string of Quaternion. More...
ALMATH_API float | AL::Math::distanceSquared (const Pose2D &pPos1, const Pose2D &pPos2)
| Compute the squared distance between two Pose2D. More...
ALMATH_API float | AL::Math::distance (const Pose2D &pPos1, const Pose2D &pPos2)
| Compute the distance between two Pose2D. More...
ALMATH_API void | AL::Math::pose2dInvertInPlace (Pose2D &pPos)
| Inverse the given Pose2D in place: More...
ALMATH_API Pose2D | AL::Math::pinv (const Pose2D &pPos)
| Alternative name for inverse: return the pose2d inverse of the given Pose2D. More...
ALMATH_API Pose2D | AL::Math::pose2dDiff (const Pose2D &pPos1, const Pose2D &pPos2)
| Compute the Pose2D between the actual Pose2D and the one give in argument result: More...
ALMATH_API Pose2D | AL::Math::pose2DInverse (const Pose2D &pPos)
| Compute the inverse of a Pose2D. More...
ALMATH_API void | AL::Math::pose2DInverse (const Pose2D &pPos, Pose2D &pRes)
| Compute the inverse of a Pose2D. More...
ALMATH_API float | AL::Math::distanceSquared (const Position2D &pPos1, const Position2D &pPos2)
| Compute the squared distance between two Position2D. More...
ALMATH_API float | AL::Math::distance (const Position2D &pPos1, const Position2D &pPos2)
| Compute the distance between two Position2D : More...
ALMATH_API float | AL::Math::norm (const Position2D &pPos)
| Compute the norm of a Position2D. More...
ALMATH_API Position2D | AL::Math::normalize (const Position2D &pPos)
| Normalize a Position2D. More...
ALMATH_API float | AL::Math::crossProduct (const Position2D &pPos1, const Position2D &pPos2)
| Compute the cross Product of two Position2D. More...
ALMATH_API void | AL::Math::crossProduct (const Position2D &pPos1, const Position2D &pPos2, float &pRes)
| Compute the cross Product of two Position2D. More...
bool | AL::Math::Position3D::isUnitVector (const float &pEpsilon=0.0001f) const
| Checks if the norm of the Position3D is near to 1.0 More...
bool | AL::Math::Position3D::isOrthogonal (const Position3D &pPos, const float &pEpsilon=0.0001f) const
| Checks if this Position3D is orthogonal to Position3D pPos More...
ALMATH_API float | AL::Math::distanceSquared (const Position3D &pPos1, const Position3D &pPos2)
| Compute the squared distance between two Position3D: More...
ALMATH_API float | AL::Math::distance (const Position3D &pPos1, const Position3D &pPos2)
| Compute the distance between two Position3D: More...
ALMATH_API float | AL::Math::norm (const Position3D &pPos)
| Compute the norm of a Position3D: More...
ALMATH_API Position3D | AL::Math::normalize (const Position3D &pPos)
| Normalize a Position3D: More...
ALMATH_API bool | AL::Math::isUnitVector (const Position3D &pPos, const float &pEpsilon=0.0001f)
| Checks if the norm of a Position3D is near to 1.0 More...
ALMATH_API bool | AL::Math::isOrthogonal (const Position3D &pPos1, const Position3D &pPos2, const float &pEpsilon=0.0001f)
| Checks if two Position3D are orthogonal More...
ALMATH_API float | AL::Math::distanceSquared (const Position6D &pPos1, const Position6D &pPos2)
| Compute the squared distance of translation part (x, y and z) between two Position6D: More...
ALMATH_API float | AL::Math::distance (const Position6D &pPos1, const Position6D &pPos2)
| Compute the distance of translation part (x, y and z) between two Position6D: More...
ALMATH_API float | AL::Math::norm (const Position6D &pPos)
| Compute the norm of a Position6D: More...
ALMATH_API Position6D | AL::Math::normalize (const Position6D &pPos)
| Normalize a Position6D: More...
ALMATH_API float | AL::Math::norm (const Quaternion &pQua)
| Compute the norm of a Quaternion: More...
ALMATH_API Quaternion | AL::Math::normalize (const Quaternion &pQua)
| Normalize a Quaternion: More...
ALMATH_API void | AL::Math::quaternionInverse (const Quaternion &pQua, Quaternion &pQuaOut)
| Return the quaternion inverse of the given Quaternion: More...
ALMATH_API Quaternion | AL::Math::quaternionInverse (const Quaternion &pQua)
| Return the quaternion inverse of the given Quaternion More...
ALMATH_API Quaternion | AL::Math::quaternionFromAngleAndAxisRotation (const float pAngle, const float pAxisX, const float pAxisY, const float pAxisZ)
| Create a Quaternion initialized with explicit angle and axis rotation. More...
ALMATH_API void | AL::Math::angleAndAxisRotationFromQuaternion (const Quaternion &pQuaternion, float &pAngle, float &pAxisX, float &pAxisY, float &pAxisZ)
| Compute angle and axis rotation from a Quaternion. More...
ALMATH_API std::vector< float > | AL::Math::angleAndAxisRotationFromQuaternion (const Quaternion &pQuaternion)
| Compute angle and axis rotation from a Quaternion. More...
ALMATH_API Rotation | AL::Math::transpose (const Rotation &pRot)
| Compute the transpose rotation of the one given in argument: More...
ALMATH_API float | AL::Math::determinant (const Rotation &pRot)
| Compute the determinant of the given Rotation: More...
ALMATH_API void | AL::Math::normalizeRotation (Rotation &pRot)
| Normalize data, if needed, to have Rotation properties. More...
ALMATH_API Rotation | AL::Math::rotationFromQuaternion (const float pA, const float pB, const float pC, const float pD)
| Creates a 3*3 Rotation Matrix from a normalized quaternion ( |a + bi + cj + dk| = 1). More...
ALMATH_API Rotation | AL::Math::rotationFromAngleDirection (const float pAngle, const float pX, const float pY, const float pZ)
| Creates a 3*3 Rotation Matrix from a an angle and a normalized direction( |pX, pY, pZ| = 1). More...
ALMATH_API void | AL::Math::applyRotation (const AL::Math::Rotation &pRot, float &pX, float &pY, float &pZ)
| Apply Rotation to a 3D point. More...
ALMATH_API Rotation | AL::Math::rotationFromRotX (const float pRotX)
| Create a Rotation initialized with explicit rotation around x axis. More...
ALMATH_API Rotation | AL::Math::rotationFromRotY (const float pRotY)
| Create a Rotation initialized with explicit rotation around y axis. More...
ALMATH_API Rotation | AL::Math::rotationFromRotZ (const float pRotZ)
| Create a Rotation initialized with explicit rotation around z axis. More...
ALMATH_API Rotation | AL::Math::rotationFrom3DRotation (const float &pWX, const float &pWY, const float &pWZ)
| Create a Rotation initialized with euler angle. Rot = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX) More...
ALMATH_API float | AL::Math::norm (const Rotation3D &pRot)
| Compute the norm of a Rotation3D: More...
ALMATH_API void | AL::Math::transformPreMultiply (const Transform &pT, Transform &pTOut)
| pTOut = pT*pTOut More...
ALMATH_API float | AL::Math::norm (const Transform &pT)
| Compute the norm translation part of the actual Transform: More...
ALMATH_API void | AL::Math::normalizeTransform (Transform &pT)
| Normalize data, if needed, to have transform properties. More...
ALMATH_API void | AL::Math::transformToFloatVector (const Transform &pT, std::vector< float > &pTOut)
| DEPRECATED: Use toVector function. Copy the Transform in a vector of float: More...
ALMATH_API std::vector< float > | AL::Math::transformToFloatVector (const Transform &pT)
| DEPRECATED: Use toVector function. Return the Transform in a vector of float: More...
ALMATH_API float | AL::Math::determinant (const Transform &pT)
| Compute the determinant of rotation part of the given Transform: More...
ALMATH_API float | AL::Math::determinant (const std::vector< float > &pFloats)
| Compute the determinant of rotation part of the given vector of floats: More...
ALMATH_API void | AL::Math::transformInverse (const Transform &pT, Transform &pTOut)
| Return the transform inverse of the given Transform: More...
ALMATH_API Transform | AL::Math::transformInverse (const Transform &pT)
| Return the transform inverse of the given Transform: More...
ALMATH_API Transform | AL::Math::transformFromRotX (const float pRotX)
| Create a Transform initialize with explicit rotation around x axis: More...
ALMATH_API Transform | AL::Math::transformFromRotY (const float pRotY)
| Create a Transform initialize with explicit rotation around y axis: More...
ALMATH_API Transform | AL::Math::transformFromRotZ (const float pRotZ)
| Create a Transform initialize with explicit rotation around z axis: More...
ALMATH_API Transform | AL::Math::transformFrom3DRotation (const float &pWX, const float &pWY, const float &pWZ)
| Create a Transform initialize with euler angle: H = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX) More...
ALMATH_API Transform | AL::Math::transformFromPosition (const float &pX, const float &pY, const float &pZ)
| Create a Transform initialize with explicit value for translation part: More...
ALMATH_API Transform | AL::Math::transformFromPosition (const float &pX, const float &pY, const float &pZ, const float &pWX, const float &pWY, const float &pWZ)
| Create a Transform initialize with explicit value for translation part and euler angle: More...
ALMATH_API void | AL::Math::transformInvertInPlace (Transform &pT)
| Inverse the given Transform in place: More...
ALMATH_API Transform | AL::Math::pinv (const Transform &pT)
| Alternative name for inverse: return the transform inverse of the given Transform: More...
ALMATH_API Transform | AL::Math::transformDiff (const Transform &pT1, const Transform &pT2)
| Compute the Transform between the actual Transform and the one give in argument result: More...
ALMATH_API float | AL::Math::transformDistanceSquared (const Transform &pT1, const Transform &pT2)
| Compute the squared distance between the actual Transform and the one give in argument (translation part): More...
ALMATH_API float | AL::Math::transformDistance (const Transform &pT1, const Transform &pT2)
| Compute the distance between the actual Transform and the one give in argument: More...
ALMATH_API float | AL::Math::norm (const Velocity3D &pVel)
| Compute the norm of a Velocity3D: More...
ALMATH_API Velocity3D | AL::Math::normalize (const Velocity3D &pVel)
| Normalize a Velocity3D: More...
ALMATH_API float | AL::Math::norm (const Velocity6D &pVel)
| Compute the norm of a Velocity6D: More...
ALMATH_API Velocity6D | AL::Math::normalize (const Velocity6D &pVel)
| Normalize a Velocity6D: More...

## Detailed Description

Types classes provide many usefull defintion in robotics field such as homogenous transform matrix, 6D vector of velocty and so on.

## Typedef Documentation

typedef std::bitset<6> AL::Math::AXIS_MASK

Definition of an AXIS_MASK as a bit set.

static const int AXIS_MASK_X = 1
static const int AXIS_MASK_Y = 2
static const int AXIS_MASK_XY = 3
static const int AXIS_MASK_Z = 4
static const int AXIS_MASK_WX = 8
static const int AXIS_MASK_WY = 16
static const int AXIS_MASK_WZ = 32
static const int AXIS_MASK_WYWZ = 48
static const int AXIS_MASK_ALL = 63
static const int AXIS_MASK_VEL = 7
static const int AXIS_MASK_ROT = 56
static const int AXIS_MASK_NONE = 0
static const int AXIS_MASK_PLANEZ = 28

Definition at line 36 of file alaxismask.h.

## Function Documentation

ALMATH_API void AL::Math::angleAndAxisRotationFromQuaternion | ( | const Quaternion & | pQuaternion,
|  | float & | pAngle,
|  | float & | pAxisX,
|  | float & | pAxisY,
|  | float & | pAxisZ
| ) |  |

Compute angle and axis rotation from a Quaternion.

Parameters

  pQuaternion | the given quaternion
  pAngle | the computed float value for angle in radian around axis rotation
  pAxisX | the computed float value for x value of axis rotation
  pAxisY | the computed float value for y value of axis rotation
  pAxisZ | the computed float value for z value of axis rotation

ALMATH_API std::vector<float> AL::Math::angleAndAxisRotationFromQuaternion | ( | const Quaternion & | pQuaternion | ) |

Compute angle and axis rotation from a Quaternion.

Parameters

  pQuaternion | the given quaternion

Returns
  a vector containing angle, axisX, axisY, axisZ.

ALMATH_API void AL::Math::applyRotation | ( | const AL::Math::Rotation & | pRot,
|  | float & | pX,
|  | float & | pY,
|  | float & | pZ
| ) |  |

Apply Rotation to a 3D point.

Parameters

  pRot | the given rotation
  pX | the X position of the 3D point after rotation
  pY | the Y position of the 3D point after rotation
  pZ | the Z position of the 3D point after rotation

ALMATH_API float AL::Math::crossProduct | ( | const Position2D & | pPos1,
|  | const Position2D & | pPos2
| ) |  |

Compute the cross Product of two Position2D.

Parameters

  pPos1 | the first Position2D
  pPos2 | the second Position2D

Returns
  the float cross product between the two Position2D

ALMATH_API void AL::Math::crossProduct | ( | const Position2D & | pPos1,
|  | const Position2D & | pPos2,
|  | float & | pRes
| ) |  |

Compute the cross Product of two Position2D.

Parameters

  pPos1 | the first Position2D
  pPos2 | the second Position2D
  pRes | the float cross product between the two Position2D

ALMATH_API float AL::Math::determinant | ( | const Rotation & | pRot | ) |

Compute the determinant of the given Rotation:

Parameters

  pRot | the given Rotation

Returns
  the float determinant of Rotation

ALMATH_API float AL::Math::determinant | ( | const Transform & | pT | ) |

Compute the determinant of rotation part of the given Transform:

Parameters

  pT | the given Transform

Returns
  the float determinant of rotation Transform part

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

Compute the determinant of rotation part of the given vector of floats:

Parameters

  pFloats | the given vector of floats

Returns
  the float determinant of rotation Transform part

ALMATH_API float AL::Math::distance | ( | const Position2D & | pPos1,
|  | const Position2D & | pPos2
| ) |  |

Compute the distance between two Position2D :

Parameters

  pPos1 | the first Position2D
  pPos2 | the second Position2D

Returns
  the float distance between the two Position2D

ALMATH_API float AL::Math::distance | ( | const Position3D & | pPos1,
|  | const Position3D & | pPos2
| ) |  |

Compute the distance between two Position3D:

Parameters

  pPos1 | the first Position3D
  pPos2 | the second Position3D

Returns
  the float distance between the two Position3D

ALMATH_API float AL::Math::distance | ( | const Position6D & | pPos1,
|  | const Position6D & | pPos2
| ) |  |

Compute the distance of translation part (x, y and z) between two Position6D:

Parameters

  pPos1 | the first Position6D
  pPos2 | the second Position6D

Returns
  the float distance between the two Position6D

ALMATH_API float AL::Math::distance | ( | const Pose2D & | pPos1,
|  | const Pose2D & | pPos2
| ) |  |

Compute the distance between two Pose2D.

Parameters

  pPos1 | the first Pose2D
  pPos2 | the second Pose2D

Returns
  the float distance between the two Pose2D

ALMATH_API float AL::Math::distanceSquared | ( | const Position2D & | pPos1,
|  | const Position2D & | pPos2
| ) |  |

Compute the squared distance between two Position2D.

Parameters

  pPos1 | the first Position2D
  pPos2 | the second Position2D

Returns
  the float squared distance between the two Position2D

ALMATH_API float AL::Math::distanceSquared | ( | const Position3D & | pPos1,
|  | const Position3D & | pPos2
| ) |  |

Compute the squared distance between two Position3D:

Parameters

  pPos1 | the first Position3D
  pPos2 | the second Position3D

Returns
  the float squared distance between the two Position3D

ALMATH_API float AL::Math::distanceSquared | ( | const Position6D & | pPos1,
|  | const Position6D & | pPos2
| ) |  |

Compute the squared distance of translation part (x, y and z) between two Position6D:

Parameters

  pPos1 | the first Position6D
  pPos2 | the second Position6D

Returns
  the float squared distance between the two Position6D

ALMATH_API float AL::Math::distanceSquared | ( | const Pose2D & | pPos1,
|  | const Pose2D & | pPos2
| ) |  |

Compute the squared distance between two Pose2D.

Parameters

  pPos1 | the first Pose2D
  pPos2 | the second Pose2D

Returns
  the float squared distance between the two Pose2D

bool AL::Math::Position3D::isOrthogonal | ( | const Position3D & | pPos,
|  | const float & | pEpsilon = `0.0001f`
| ) |  | const

Checks if this Position3D is orthogonal to Position3D pPos

Parameters

  pEpsilon | an optional epsilon distance

Returns
  true if orthogonal

ALMATH_API bool AL::Math::isOrthogonal | ( | const Position3D & | pPos1,
|  | const Position3D & | pPos2,
|  | const float & | pEpsilon = `0.0001f`
| ) |  |

Checks if two Position3D are orthogonal

Parameters

  pPos1 | the first Position3D
  pPos2 | the second Position3D
  pEpsilon | an optional epsilon distance

Returns
  true if orthogonal

bool AL::Math::Position3D::isUnitVector | ( | const float & | pEpsilon = `0.0001f` | ) | const

Checks if the norm of the Position3D is near to 1.0

Parameters

  pEpsilon | an optional epsilon distance

Returns
  true if the norm of the vector is near to 1.0

ALMATH_API bool AL::Math::isUnitVector | ( | const Position3D & | pPos,
|  | const float & | pEpsilon = `0.0001f`
| ) |  |

Checks if the norm of a Position3D is near to 1.0

Parameters

  pPos | the Position3D
  pEpsilon | an optional epsilon distance

Returns
  true if the norm of the vector is near to 1.0

ALMATH_API float AL::Math::norm | ( | const Rotation3D & | pRot | ) |

Compute the norm of a Rotation3D:

Parameters

  pRot | the given Rotation3D

Returns
  the float norm of the given Rotation3D

ALMATH_API float AL::Math::norm | ( | const Quaternion & | pQua | ) |

Compute the norm of a Quaternion:

Parameters

  pQua | the given Quaternion

Returns
  the float norm of the given Quaternion

ALMATH_API float AL::Math::norm | ( | const Velocity3D & | pVel | ) |

Compute the norm of a Velocity3D:

Parameters

  pVel | the given Velocity3D

Returns
  the float norm of the given Velocity3D

ALMATH_API float AL::Math::norm | ( | const Velocity6D & | pVel | ) |

Compute the norm of a Velocity6D:

Parameters

  pVel | the given Velocity6D

Returns
  the float norm of the given Velocity6D

ALMATH_API float AL::Math::norm | ( | const Position2D & | pPos | ) |

Compute the norm of a Position2D.

Parameters

  pPos | the given Position2D

Returns
  the float norm of the given Position2D

ALMATH_API float AL::Math::norm | ( | const Position3D & | pPos | ) |

Compute the norm of a Position3D:

Parameters

  pPos | the given Position3D

Returns
  the float norm of the given Position3D

ALMATH_API float AL::Math::norm | ( | const Position6D & | pPos | ) |

Compute the norm of a Position6D:

Parameters

  pPos | the given Position6D

Returns
  the float norm of the given Position6D

ALMATH_API float AL::Math::norm | ( | const Transform & | pT | ) |

Compute the norm translation part of the actual Transform:

Parameters

  pT | the given Transform

Returns
  the float norm of the given Transform

ALMATH_API Quaternion AL::Math::normalize | ( | const Quaternion & | pQua | ) |

Normalize a Quaternion:

Parameters

  pQua | the given Quaternion

Returns
  the given Quaternion normalized

ALMATH_API Velocity3D AL::Math::normalize | ( | const Velocity3D & | pVel | ) |

Normalize a Velocity3D:

Parameters

  pVel | the given Velocity3D

Returns
  the given Velocity3D normalized

ALMATH_API Velocity6D AL::Math::normalize | ( | const Velocity6D & | pVel | ) |

Normalize a Velocity6D:

Parameters

  pVel | the given Velocity6D

Returns
  the given Velocity6D normalized

ALMATH_API Position2D AL::Math::normalize | ( | const Position2D & | pPos | ) |

Normalize a Position2D.

Parameters

  pPos | the given Position2D

Returns
  the given Position2D normalized

ALMATH_API Position3D AL::Math::normalize | ( | const Position3D & | pPos | ) |

Normalize a Position3D:

Parameters

  pPos | the given Position3D

Returns
  the given Position3D normalized

ALMATH_API Position6D AL::Math::normalize | ( | const Position6D & | pPos | ) |

Normalize a Position6D:

Parameters

  pPos | the given Position6D

Returns
  the given Position6D normalized

ALMATH_API void AL::Math::normalizeRotation | ( | Rotation & | pRot | ) |

Normalize data, if needed, to have Rotation properties.

Parameters

  pRot | the given Rotation

ALMATH_API void AL::Math::normalizeTransform | ( | Transform & | pT | ) |

Normalize data, if needed, to have transform properties.

Parameters

  pT | the given Transform

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Pose2D & | pPos
| ) |  |

Overloading of operator << for Pose2D.

Parameters

  pStream | the given ostream
  pPos | the given Pose2D

Returns
  the Pose2D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Position2D & | pPos
| ) |  |

Overloading of operator << for Position2D.

Parameters

  pStream | the given ostream
  pPos | the given Position2D

Returns
  the Position2D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Position3D & | pPos
| ) |  |

Overloading of operator << for Position3D.

Parameters

  pStream | the given ostream
  pPos | the given Position3D

Returns
  the Position3D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Position6D & | pPos
| ) |  |

Overloading of operator << for Position6D.

Parameters

  pStream | the given ostream
  pPos | the given Position6D

Returns
  the Position6D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const PositionAndVelocity & | pPosVel
| ) |  |

Overloading of operator << for PositionAndVelocity.

Parameters

  pStream | the given ostream
  pPosVel | the given PositionAndVelocity

Returns
  the PositionAndVelocity print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Rotation & | pRot
| ) |  |

Overloading of operator << for Rotation.

Parameters

  pStream | the given ostream
  pRot | the given Rotation

Returns
  the Rotation print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Rotation3D & | pRot
| ) |  |

Overloading of operator << for Rotation3D.

Parameters

  pStream | the given ostream
  pRot | the given Rotation3D

Returns
  the Rotation3D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Transform & | pT
| ) |  |

Overloading of operator << for Transform.

Parameters

  pStream | the given ostream
  pT | the given Transform

Returns
  the Transform print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const TransformAndVelocity6D & | pTV
| ) |  |

Overloading of operator << for TransformAndVelocity6D.

Parameters

  pStream | the given ostream
  pTV | the given TransformAndVelocity6D

Returns
  the TransformAndVelocity6D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Velocity3D & | pVel
| ) |  |

Overloading of operator << for Velocity3D.

Parameters

  pStream | the given ostream
  pVel | the given Velocity3D

Returns
  the Velocity3D print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Quaternion & | pQua
| ) |  |

Overloading of operator << for Quaternion.

Parameters

  pStream | the given ostream
  pQua | the given Quaternion

Returns
  the Quaternion print

ALMATH_API std::ostream& AL::Math::operator<< | ( | std::ostream & | pStream,
|  | const Velocity6D & | pVel
| ) |  |

Overloading of operator << for Velocity6D.

Parameters

  pStream | the given ostream
  pVel | the given Velocity6D

Returns
  the Velocity6D print

ALMATH_API Pose2D AL::Math::pinv | ( | const Pose2D & | pPos | ) |

Alternative name for inverse: return the pose2d inverse of the given Pose2D.

Parameters

  pPos | the given Pose2D

ALMATH_API Transform AL::Math::pinv | ( | const Transform & | pT | ) |

Alternative name for inverse: return the transform inverse of the given Transform:

Parameters

  pT | the given Transform

ALMATH_API Pose2D AL::Math::pose2dDiff | ( | const Pose2D & | pPos1,
|  | const Pose2D & | pPos2
| ) |  |

Compute the Pose2D between the actual Pose2D and the one give in argument result:

inverse(pPos1)*pPos2

Parameters

  pPos1 | the first Pose2D
  pPos2 | the second Pose2D

Returns
  the Pose2D

ALMATH_API Pose2D AL::Math::pose2DInverse | ( | const Pose2D & | pPos | ) |

Compute the inverse of a Pose2D.

Parameters

  pPos | the initial Pose2D

Returns
  the inverse Pose2D

ALMATH_API void AL::Math::pose2DInverse | ( | const Pose2D & | pPos,
|  | Pose2D & | pRes
| ) |  |

Compute the inverse of a Pose2D.

Parameters

  pPos | the initial Pose2D
  pRes | the inverse Pose2D

ALMATH_API void AL::Math::pose2dInvertInPlace | ( | Pose2D & | pPos | ) |

Inverse the given Pose2D in place:

Parameters

  pPos | the given Pose2D

ALMATH_API Quaternion AL::Math::quaternionFromAngleAndAxisRotation | ( | const float | pAngle,
|  | const float | pAxisX,
|  | const float | pAxisY,
|  | const float | pAxisZ
| ) |  |

Create a Quaternion initialized with explicit angle and axis rotation.

Parameters

  pAngle | the float value for angle in radian around axis rotation
  pAxisX | the float value for x value of axis rotation
  pAxisY | the float value for y value of axis rotation
  pAxisZ | the float value for z value of axis rotation

Returns
  the Quaternion

ALMATH_API void AL::Math::quaternionInverse | ( | const Quaternion & | pQua,
|  | Quaternion & | pQuaOut
| ) |  |

Return the quaternion inverse of the given Quaternion:

Parameters

  pQua | the given Quaternion
  pQuaOut | the inverse of the given Quaternion

ALMATH_API Quaternion AL::Math::quaternionInverse | ( | const Quaternion & | pQua | ) |

Return the quaternion inverse of the given Quaternion

Parameters

  pQua | the given Quaternion

Returns
  the Quaternion inverse

ALMATH_API Rotation AL::Math::rotationFrom3DRotation | ( | const float & | pWX,
|  | const float & | pWY,
|  | const float & | pWZ
| ) |  |

Create a Rotation initialized with euler angle. Rot = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX)

Parameters

  pWX | the float value for euler angle x in radian
  pWY | the float value for euler angle y in radian
  pWZ | the float value for euler angle z in radian

Returns
  the Rotation matrix

ALMATH_API Rotation AL::Math::rotationFromAngleDirection | ( | const float | pAngle,
|  | const float | pX,
|  | const float | pY,
|  | const float | pZ
| ) |  |

Creates a 3*3 Rotation Matrix from a an angle and a normalized direction( |pX, pY, pZ| = 1).

Parameters

  pAngle | the float value of angle in radian
  pX | the X direction of the vector of the rotation
  pY | the Y direction of the vector of the rotation
  pZ | the Z direction of the vector of the rotation

Returns
  the Rotation matrix

ALMATH_API Rotation AL::Math::rotationFromQuaternion | ( | const float | pA,
|  | const float | pB,
|  | const float | pC,
|  | const float | pD
| ) |  |

Creates a 3*3 Rotation Matrix from a normalized quaternion ( |a + bi + cj + dk| = 1).

Parameters

  pA | Coefficient a of the normalized quaternion
  pB | Coefficient b of the normalized quaternion
  pC | Coefficient c of the normalized quaternion
  pD | Coefficient d of the normalized quaternion

Returns
  the Rotation matrix

ALMATH_API Rotation AL::Math::rotationFromRotX | ( | const float | pRotX | ) |

Create a Rotation initialized with explicit rotation around x axis.

Parameters

  pRotX | the float value for angle rotation in radian around x axis

Returns
  the Rotation matrix

ALMATH_API Rotation AL::Math::rotationFromRotY | ( | const float | pRotY | ) |

Create a Rotation initialized with explicit rotation around y axis.

Parameters

  pRotY | the float value for angle rotation in radian around y axis

Returns
  the Rotation matrix

ALMATH_API Rotation AL::Math::rotationFromRotZ | ( | const float | pRotZ | ) |

Create a Rotation initialized with explicit rotation around z axis.

Parameters

  pRotZ | the float value for angle rotation in radian around z axis

Returns
  the Rotation matrix

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Position3D & | pPos | ) |

Create a string of Position3D.

Parameters

  pPos | the given Position3D

Returns
  the Position3D string

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Rotation3D & | pPos | ) |

Create a string of Rotation3D.

Parameters

  pPos | the given Rotation3D

Returns
  the Rotation3D string

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Velocity6D & | pVel | ) |

Create a string of Velocity6D.

Parameters

  pVel | the given Velocity6D

Returns
  the Velocity6D string

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Transform & | pT | ) |

Create a string of Transform.

Parameters

  pT | the given Transform

Returns
  the Transform string

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Position6D & | pPos | ) |

Create a string of Position6D.

Parameters

  pPos | the given Position6D

Returns
  the Position6D string

ALMATH_API std::string AL::Math::toSpaceSeparated | ( | const Quaternion & | pQuat | ) |

Create a string of Quaternion.

<param name="pQuat> the given Quaternion

Returns
  the Quaternion string

ALMATH_API Transform AL::Math::transformDiff | ( | const Transform & | pT1,
|  | const Transform & | pT2
| ) |  |

Compute the Transform between the actual Transform and the one give in argument result:

inverse(pT1)*pT2

Parameters

  pT1 | the first transform
  pT2 | the second transform

Returns
  the Transform

ALMATH_API float AL::Math::transformDistance | ( | const Transform & | pT1,
|  | const Transform & | pT2
| ) |  |

Compute the distance between the actual Transform and the one give in argument:

Parameters

  pT1 | the first Transform
  pT2 | the second Transform

Returns
  the float distance between the two Transform

ALMATH_API float AL::Math::transformDistanceSquared | ( | const Transform & | pT1,
|  | const Transform & | pT2
| ) |  |

Compute the squared distance between the actual Transform and the one give in argument (translation part):

Parameters

  pT1 | the first Transform
  pT2 | the second Transform

Returns
  the float squared distance between the two Transform: translation part

ALMATH_API Transform AL::Math::transformFrom3DRotation | ( | const float & | pWX,
|  | const float & | pWY,
|  | const float & | pWZ
| ) |  |

Create a Transform initialize with euler angle: H = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX)

Parameters

  pWX | the float value for euler angle x in radian
  pWY | the float value for euler angle y in radian
  pWZ | the float value for euler angle z in radian

Returns
  the Transform

ALMATH_API Transform AL::Math::transformFromPosition | ( | const float & | pX,
|  | const float & | pY,
|  | const float & | pZ
| ) |  |

Create a Transform initialize with explicit value for translation part:

Parameters

  pX | the float value for translation axis x in meter (r1_c4)
  pY | the float value for translation axis y in meter (r2_c4)
  pZ | the float value for translation axis z in meter (r3_c4)

Returns
  the Transform

ALMATH_API Transform AL::Math::transformFromPosition | ( | const float & | pX,
|  | const float & | pY,
|  | const float & | pZ,
|  | const float & | pWX,
|  | const float & | pWY,
|  | const float & | pWZ
| ) |  |

Create a Transform initialize with explicit value for translation part and euler angle:

H = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX)

H.r1_c4 = pX

H.r2_c4 = pY

H.r3_c4 = pZ

Parameters

  pX | the float value for translation axis x in meter (r1_c4)
  pY | the float value for translation axis y in meter (r2_c4)
  pZ | the float value for translation axis z in meter (r3_c4)
  pWX | the float value for euler angle x in radian
  pWY | the float value for euler angle y in radian
  pWZ | the float value for euler angle z in radian

Returns
  the Transform

ALMATH_API Transform AL::Math::transformFromRotX | ( | const float | pRotX | ) |

Create a Transform initialize with explicit rotation around x axis:

Parameters

  pRotX | the float value for angle rotation in radian around x axis

Returns
  the Transform

ALMATH_API Transform AL::Math::transformFromRotY | ( | const float | pRotY | ) |

Create a Transform initialize with explicit rotation around y axis:

Parameters

  pRotY | the float value for angle rotation in radian around y axis

Returns
  the Transform

ALMATH_API Transform AL::Math::transformFromRotZ | ( | const float | pRotZ | ) |

Create a Transform initialize with explicit rotation around z axis:

Parameters

  pRotZ | the float value for angle rotation in radian around z axis

Returns
  the Transform

ALMATH_API void AL::Math::transformInverse | ( | const Transform & | pT,
|  | Transform & | pTOut
| ) |  |

Return the transform inverse of the given Transform:

Parameters

  pT | the given Transform
  pTOut | the inverse of the given Transform

ALMATH_API Transform AL::Math::transformInverse | ( | const Transform & | pT | ) |

Return the transform inverse of the given Transform:

Parameters

  pT | the given Transform

Returns
  the Transform inverse

ALMATH_API void AL::Math::transformInvertInPlace | ( | Transform & | pT | ) |

Inverse the given Transform in place:

Parameters

  pT | the given Transform

ALMATH_API void AL::Math::transformPreMultiply | ( | const Transform & | pT,
|  | Transform & | pTOut
| ) |  |

pTOut = pT*pTOut

Parameters

  pT | the first constant Transform
  pTOut | the second modified Transform

ALMATH_API void AL::Math::transformToFloatVector | ( | const Transform & | pT,
|  | std::vector< float > & | pTOut
| ) |  |

DEPRECATED: Use toVector function. Copy the Transform in a vector of float:

Parameters

  pT | the given Transform
  pTOut | the vector of float update to given transform value

ALMATH_API std::vector<float> AL::Math::transformToFloatVector | ( | const Transform & | pT | ) |

DEPRECATED: Use toVector function. Return the Transform in a vector of float:

Parameters

  pT | the given Transform

Returns
  the vector of float update to given transform value

ALMATH_API Rotation AL::Math::transpose | ( | const Rotation & | pRot | ) |

Compute the transpose rotation of the one given in argument:

Parameters

  pRot | the rotation matrix

Returns
  the rotation transposed