libalmath  2.1.4.13
 All Classes Namespaces Functions Variables Typedefs Groups Pages
aldisplacement.h
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 ALDISPLACEMENT_H
10 #define ALDISPLACEMENT_H
11 
12 #include <almath/types/alposition3d.h>
13 #include <almath/types/alquaternion.h>
14 
15 namespace AL {
16  namespace Math {
17 
21  struct Displacement
22  {
27 
31  explicit Displacement();
32 
41  const Position3D& pos3d,
42  const Quaternion& quat = Quaternion());
43 
52  Displacement& operator*=(const Displacement& pDisp);
53 
61  Displacement operator*(const Displacement& pDisp);
62 
72  bool isNear(
73  const Displacement& pDisp2,
74  const float pEpsilon=0.0001f) const;
75 
76  };
77 
78  }
79 }
80 
81 #endif // ALDISPLACEMENT_H
bool isNear(const Displacement &pDisp2, const float pEpsilon=0.0001f) const
Check if the current Displacement is Near the one given in argument.
Struct composed of a Position3D and a Quaternion
Quaternion Q
Rotation of the Displacement
Position3D P
Translation of the Displacement
Displacement()
Create a Displacement initialized with default values
Displacement & operator*=(const Displacement &pDisp)
Defining composition of Displacement with * sign
Displacement operator*(const Displacement &pDisp)
Define the binary operation of a composition of Displacements.
Create and play with a Quaternion.
Definition: alquaternion.h:23
Create and play with a Position3D.
Definition: alposition3d.h:23