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

libalmath 2.8.7.4

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
altransformhelpers.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the COPYING file.
5 */
6
7
8 #pragma once
9 #ifndef _LIBALMATH_ALMATH_TOOLS_ALTRANSFORMHELPERS_H_
10 #define _LIBALMATH_ALMATH_TOOLS_ALTRANSFORMHELPERS_H_
11
12 #include <almath/types/alposition2d.h>
13 #include <almath/types/alposition3d.h>
14 #include <almath/types/alposition6d.h>
15 #include <almath/types/alrotation.h>
16 #include <almath/types/alrotation3d.h>
17 #include <almath/types/alvelocity6d.h>
18 #include <almath/types/altransform.h>
19 #include <almath/types/alaxismask.h>
20 #include <almath/types/alpose2d.h>
21 #include <almath/types/alquaternion.h>
22 #include <almath/types/aldisplacement.h>
23
24 namespace AL {
25 namespace Math {
26
27
31
40 ALMATH_API void transformLogarithmInPlace(
48 const Transform& pT,
49 Velocity6D& pVel);
50
51
55
64 ALMATH_API Velocity6D transformLogarithm(const Transform& pT);
71
72
74
78 ALMATH_API Transform velocityExponential(const Velocity6D& pVel);
85
86 // TODO: Add to doc or set private.
87 ALMATH_API void velocityExponentialInPlace(
88 const Velocity6D& pVel,
89 Transform& pT);
90
92
120 ALMATH_API void changeReferenceVelocity6D(
129 const Transform& pT,
130 const Velocity6D& pVelIn,
131 Velocity6D& pVelOut);
132
134
162 ALMATH_API void changeReferencePosition6D(
171 const Transform& pT,
172 const Position6D& pPosIn,
173 Position6D& pPosOut);
174
175 // TODO: rename argument.
176 ALMATH_API void changeReferencePosition3DInPlace(
177 const Transform& pT,
178 Position3D& pPosOut);
179
180 // TODO: rename argument.
181 ALMATH_API void changeReferenceTransposePosition3DInPlace(
182 const Transform& pT,
183 Position3D& pPosOut);
184
186
205 ALMATH_API void changeReferencePosition3D(
214 const Transform& pT,
215 const Position3D& pPosIn,
216 Position3D& pPosOut);
217
219
231 ALMATH_API void changeReferenceTransposePosition3D(
239 const Transform& pT,
240 const Position3D& pPosIn,
241 Position3D& pPosOut);
242
244
256 ALMATH_API void changeReferenceTransform(
264 const Transform& pT,
265 const Transform& pTIn,
266 Transform& pTOut);
267
269
281 ALMATH_API void changeReferenceTransposeTransform(
289 const Transform& pT,
290 const Transform& pTIn,
291 Transform& pTOut);
292
293
295
323 ALMATH_API void changeReferenceTransposeVelocity6D(
332 const Transform& pT,
333 const Velocity6D& pVelIn,
334 Velocity6D& pVelOut);
335
337
365 ALMATH_API void changeReferenceTransposePosition6D(
374 const Transform& pT,
375 const Position6D& pPosIn,
376 Position6D& pPosOut);
377
388 ALMATH_API void transformMeanInPlace(
389 const Transform& pTIn1,
390 const Transform& pTIn2,
391 const float& pVal,
392 Transform& pTOut);
393
405 ALMATH_API Transform transformMean(
406 const Transform& pTIn1,
407 const Transform& pTIn2,
408 const float& pVal = 0.5f);
409
412
419 ALMATH_API Transform transformFromRotationPosition3D(
429 const Rotation& pRot,
430 const float& pX,
431 const float& pY,
432 const float& pZ);
433
436
442 ALMATH_API Transform transformFromRotationPosition3D(
450 const Rotation& pRot,
451 const Position3D& pPos);
452
455
466 ALMATH_API void transformFromPosition3DInPlace(
471 const Position3D& pPosition,
472 Transform& pTransform);
473
477
488 ALMATH_API Transform transformFromPosition3D(const Position3D& pPosition);
496
500
511 ALMATH_API void transformFromRotationInPlace(
516 const Rotation& pRotation,
517 Transform& pTransform);
518
520
531 ALMATH_API Transform transformFromRotation(const Rotation& pRotation);
538
545 ALMATH_API void rotationFromTransformInPlace(
546 const Transform& pTransform,
547 Rotation& pRotation);
548
557 ALMATH_API Rotation rotationFromTransform(const Transform& pTransform);
558
568 ALMATH_API Rotation3D rotation3DFromRotation(const Rotation& pRotation);
569
583 ALMATH_API Rotation rotationFromAxesXY(const Position3D& pX, const Position3D& pY);
584
598 ALMATH_API Rotation rotationFromAxesXZ(const Position3D& pX, const Position3D& pZ);
599
613 ALMATH_API Rotation rotationFromAxesYZ(const Position3D& pY, const Position3D& pZ);
614
628 ALMATH_API Rotation rotationFromAxesXYZ(const Position3D& pX, const Position3D& pY, const Position3D& pZ);
629
630
637 ALMATH_API void position6DFromTransformInPlace(
638 const Transform& pT,
639 Position6D& pPos);
640
647 ALMATH_API Position6D position6DFromTransform(const Transform& pT);
648
655 ALMATH_API void transformFromPose2DInPlace(
656 const Pose2D& pPose,
657 Transform& pT);
658
665 ALMATH_API Transform transformFromPose2D(const Pose2D& pPose);
666
673 ALMATH_API void pose2DFromTransformInPlace(
674 const Transform& pT,
675 Pose2D& pPos);
676
683 ALMATH_API Pose2D pose2DFromTransform(const Transform& pT);
684
691 ALMATH_API void position2DFromTransformInPlace(
692 const Transform& pT,
693 Position2D& pPos);
694
701 ALMATH_API Position2D position2DFromTransform(const Transform& pT);
702
711 ALMATH_API Transform transformFromRotation3D(const Rotation3D& pRotation);
712
719 ALMATH_API Transform transformFromPosition6D(const Position6D& pPosition6D);
720
739 ALMATH_API void position6DFromTransformDiffInPlace(
740 const Transform& pCurrent,
741 const Transform& pTarget,
742 Position6D& result);
743
753 ALMATH_API Position6D position6DFromTransformDiff(
754 const Transform& pCurrent,
755 const Transform& pTarget);
756
760
774 ALMATH_API void position3DFromTransformInPlace(
779 const Transform& pT,
780 Position3D& pPos);
781
785
799 ALMATH_API Position3D position3DFromTransform(const Transform& pT);
804
805
814 ALMATH_API Rotation3D rotation3DFromTransform(const Transform& pT);
815
824 ALMATH_API void transformFromRotVecInPlace(
825 const int pAxis,
826 const float pTheta,
827 const Position3D& pPos,
828 Transform& pT);
829
837 ALMATH_API Transform transformFromRotVec(
838 const int pAxis,
839 const float pTheta,
840 const Position3D& pPos);
841
842
848 ALMATH_API void transformFromRotVecInPlace(
849 const Position3D& pPos,
850 Transform& pT);
851
857 ALMATH_API Transform transformFromRotVec(const Position3D& pPos);
858
863
866 ALMATH_API Transform transformFromRotVec(
867 const int& pAxis,
868 const float& pTheta);
869
870 ALMATH_API Position3D operator*(
871 const Transform& pT,
872 const Position2D& pPos);
873
874 ALMATH_API Position3D operator*(
875 const Transform& pT,
876 const Position3D& pPos);
877
885 ALMATH_API Transform axisRotationProjection(
886 const Position3D& pAxis,
887 const Transform& pT);
888
896 ALMATH_API Rotation axisRotationProjection(
897 const Position3D& pAxis,
898 const Rotation& pRot);
899
900
907 ALMATH_API void axisRotationProjectionInPlace(
908 const Position3D& pAxis,
909 Transform& pT);
910
917 ALMATH_API void axisRotationProjectionInPlace(
918 const Position3D& pAxis,
919 Rotation& pRot);
920
927 ALMATH_API void orthogonalSpace(
928 const Position3D& pPos,
929 Transform& pTf);
930
931 ALMATH_API Transform orthogonalSpace(const Position3D& pPos);
932
933 ALMATH_API Transform transformFromQuaternion(
934 const Quaternion& pQua);
935
936 ALMATH_API Quaternion quaternionFromTransform(
937 const Transform& pT);
938
945 ALMATH_API Transform transformFromDisplacement(const Displacement& pDisp);
946
953 ALMATH_API Displacement displacementFromTransform(const Transform& pTrans);
954
955 } // namespace Math
956 } // namespace AL
957 #endif // _LIBALMATH_ALMATH_TOOLS_ALTRANSFORMHELPERS_H_
AL::Math::changeReferenceTransposeTransform
ALMATH_API void changeReferenceTransposeTransform(const Transform &pT, const Transform &pTIn, Transform &pTOut)
AL::Math::changeReferenceTransposePosition3D
ALMATH_API void changeReferenceTransposePosition3D(const Transform &pT, const Position3D &pPosIn, Position3D &pPosOut)
AL::Math::velocityExponential
ALMATH_API Transform velocityExponential(const Velocity6D &pVel)
AL::Math::changeReferencePosition3DInPlace
ALMATH_API void changeReferencePosition3DInPlace(const Transform &pT, Position3D &pPosOut)
alposition6d.h
alrotation.h
AL::Math::pose2DFromTransformInPlace
ALMATH_API void pose2DFromTransformInPlace(const Transform &pT, Pose2D &pPos)
Compute a Pose2D from a Transform.
AL::Math::orthogonalSpace
ALMATH_API void orthogonalSpace(const Position3D &pPos, Transform &pTf)
AL::Math::rotationFromAxesXY
ALMATH_API Rotation rotationFromAxesXY(const Position3D &pX, const Position3D &pY)
return a Rotation Matrix initialized with its direction vectors X and Y in world coordinates. These vectors represent, respectively, the first and second columns of the Rotation matrix. The vectors must be unitary and orthogonal.
AL::Math::position2DFromTransformInPlace
ALMATH_API void position2DFromTransformInPlace(const Transform &pT, Position2D &pPos)
Compute a Position2D from a Transform.
AL::Math::rotation3DFromTransform
ALMATH_API Rotation3D rotation3DFromTransform(const Transform &pT)
Create a Rotation3D (Roll, Pitch, Yaw) corresponding to the rotational part of the Transform...
AL::Math::position6DFromTransformDiff
ALMATH_API Position6D position6DFromTransformDiff(const Transform &pCurrent, const Transform &pTarget)
Computes a 6 differential motion require to move from a 4*4 Homogenous transform matrix Current to a ...
AL::Math::transformFromPose2D
ALMATH_API Transform transformFromPose2D(const Pose2D &pPose)
Create a Transform from a Pose2D.
AL::Math::position2DFromTransform
ALMATH_API Position2D position2DFromTransform(const Transform &pT)
Create a Position2D from a Transform.
alposition3d.h
AL::Math::position3DFromTransform
ALMATH_API Position3D position3DFromTransform(const Transform &pT)
Create a Position3D from a Transform.
AL::Math::transformMean
ALMATH_API Transform transformMean(const Transform &pTIn1, const Transform &pTIn2, const float &pVal=0.5f)
Preform a logarithmic mean of pTIn1 and pTIn2.
AL::Math::rotationFromTransform
ALMATH_API Rotation rotationFromTransform(const Transform &pTransform)
AL::Math::transformFromDisplacement
ALMATH_API Transform transformFromDisplacement(const Displacement &pDisp)
AL::Math::transformFromRotation3D
ALMATH_API Transform transformFromRotation3D(const Rotation3D &pRotation)
Create a Transform from the 3 angles stored in a Rotation3D. The angles are composed in the following...
AL::Math::transformFromRotVecInPlace
ALMATH_API void transformFromRotVecInPlace(const int pAxis, const float pTheta, const Position3D &pPos, Transform &pT)
Compute a Transform from
AL::Math::position6DFromTransformInPlace
ALMATH_API void position6DFromTransformInPlace(const Transform &pT, Position6D &pPos)
Compute Position6D corresponding to the Transform.
AL::Math::displacementFromTransform
ALMATH_API Displacement displacementFromTransform(const Transform &pTrans)
AL::Math::pose2DFromTransform
ALMATH_API Pose2D pose2DFromTransform(const Transform &pT)
Create a Pose2D from a Transform.
AL::Math::position6DFromTransformDiffInPlace
ALMATH_API void position6DFromTransformDiffInPlace(const Transform &pCurrent, const Transform &pTarget, Position6D &result)
Computes a 6 differential motion required to move from a 4*4 Homogenous transform matrix Current to a...
AL::Math::transformFromPosition3D
ALMATH_API Transform transformFromPosition3D(const Position3D &pPosition)
Create a 4*4 transform matrix from cartesian coordinates given in pPosition.
alrotation3d.h
AL::Math::position3DFromTransformInPlace
ALMATH_API void position3DFromTransformInPlace(const Transform &pT, Position3D &pPos)
Compute a Position3D from a Transform.
alpose2d.h
AL::Math::rotationFromAxesXZ
ALMATH_API Rotation rotationFromAxesXZ(const Position3D &pX, const Position3D &pZ)
return a Rotation Matrix initialized with its direction vectors X and Z in world coordinates. These vectors represent, respectively, the first and third columns of the Rotation matrix. The vectors must be unitary and orthogonal.
alvelocity6d.h
AL::Math::changeReferenceTransposePosition6D
ALMATH_API void changeReferenceTransposePosition6D(const Transform &pT, const Position6D &pPosIn, Position6D &pPosOut)
AL::Math::transformFromRotationPosition3D
ALMATH_API Transform transformFromRotationPosition3D(const Rotation &pRot, const float &pX, const float &pY, const float &pZ)
Create a Transform from 3D cartesian coordiantes and a Rotation.
AL::Math::transformFromPose2DInPlace
ALMATH_API void transformFromPose2DInPlace(const Pose2D &pPose, Transform &pT)
Compute a Transform from a Pose2D.
alaxismask.h
AL::Math::rotation3DFromRotation
ALMATH_API Rotation3D rotation3DFromRotation(const Rotation &pRotation)
return 3 angles which result in the equivalent rotation when composed in the following order: Rz(wz) ...
AL::Math::axisRotationProjectionInPlace
ALMATH_API void axisRotationProjectionInPlace(const Position3D &pAxis, Transform &pT)
AL::Math::transformFromQuaternion
ALMATH_API Transform transformFromQuaternion(const Quaternion &pQua)
AL::Math::transformFromRotVec
ALMATH_API Transform transformFromRotVec(const int pAxis, const float pTheta, const Position3D &pPos)
AL::Math::transformFromPosition6D
ALMATH_API Transform transformFromPosition6D(const Position6D &pPosition6D)
Create a Transform from a Position6D.
AL::Math::transformFromRotation
ALMATH_API Transform transformFromRotation(const Rotation &pRotation)
AL::Math::quaternionFromTransform
ALMATH_API Quaternion quaternionFromTransform(const Transform &pT)
AL::Math::changeReferencePosition3D
ALMATH_API void changeReferencePosition3D(const Transform &pT, const Position3D &pPosIn, Position3D &pPosOut)
alposition2d.h
AL::Math::changeReferenceTransform
ALMATH_API void changeReferenceTransform(const Transform &pT, const Transform &pTIn, Transform &pTOut)
AL::Math::rotationFromTransformInPlace
ALMATH_API void rotationFromTransformInPlace(const Transform &pTransform, Rotation &pRotation)
Extract the position coordinates from a Transform.
AL::Math::transformLogarithm
ALMATH_API Velocity6D transformLogarithm(const Transform &pT)
Compute the logarithme of a transform. Angle must be between
altransform.h
AL::Math::changeReferencePosition6D
ALMATH_API void changeReferencePosition6D(const Transform &pT, const Position6D &pPosIn, Position6D &pPosOut)
AL::Math::transformMeanInPlace
ALMATH_API void transformMeanInPlace(const Transform &pTIn1, const Transform &pTIn2, const float &pVal, Transform &pTOut)
Preform a logarithmic mean of pTIn1 and pTIn2 and put it in pTout.
AL::Math::rotationFromAxesYZ
ALMATH_API Rotation rotationFromAxesYZ(const Position3D &pY, const Position3D &pZ)
return a Rotation Matrix initialized with its direction vectors X and Y in world coordinates. These vectors represent, respectively, the second and third columns of the Rotation matrix. The vectors must be unitary and orthogonal.
AL::Math::transformLogarithmInPlace
ALMATH_API void transformLogarithmInPlace(const Transform &pT, Velocity6D &pVel)
Compute the logarithme of a transform. Angle must be between
AL::Math::rotationFromAxesXYZ
ALMATH_API Rotation rotationFromAxesXYZ(const Position3D &pX, const Position3D &pY, const Position3D &pZ)
return a Rotation Matrix initialized with its direction vectors in world coordinates. The vectors represent the columns of the Rotation matrix. The vectors must be unitary and orthogonal.
AL::Math::changeReferenceTransposeVelocity6D
ALMATH_API void changeReferenceTransposeVelocity6D(const Transform &pT, const Velocity6D &pVelIn, Velocity6D &pVelOut)
aldisplacement.h
AL::Math::changeReferenceVelocity6D
ALMATH_API void changeReferenceVelocity6D(const Transform &pT, const Velocity6D &pVelIn, Velocity6D &pVelOut)
AL::Math::operator*
ALMATH_API Position3D operator*(const Rotation &pRot, const Position3D &pPos)
Overloading of operator * between Rotation and Position3D:
AL::Math::axisRotationProjection
ALMATH_API Transform axisRotationProjection(const Position3D &pAxis, const Transform &pT)
AL::Math::transformFromPosition3DInPlace
ALMATH_API void transformFromPosition3DInPlace(const Position3D &pPosition, Transform &pTransform)
Modify pTransform to set the translation part to pPosition.
AL::Math::velocityExponentialInPlace
ALMATH_API void velocityExponentialInPlace(const Velocity6D &pVel, Transform &pT)
AL::Math::position6DFromTransform
ALMATH_API Position6D position6DFromTransform(const Transform &pT)
Compute Position6D corresponding to 4*4 Homogenous Transform.
alquaternion.h
AL::Math::transformFromRotationInPlace
ALMATH_API void transformFromRotationInPlace(const Rotation &pRotation, Transform &pTransform)
Modify the rotation part of the transform. The translation part of the transform is not modified...
AL::Math::changeReferenceTransposePosition3DInPlace
ALMATH_API void changeReferenceTransposePosition3DInPlace(const Transform &pT, Position3D &pPosOut)