libalmath  2.5.11.14a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aldisplacement.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 ALDISPLACEMENT_H
10 #define ALDISPLACEMENT_H
11 
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
Displacement()
Create a Displacement initialized with default values
Struct composed of a Position3D and a Quaternion
Displacement operator*(const Displacement &pDisp)
Define the binary operation of a composition of Displacements.
Create and play with a Position3D.
Definition: alposition3d.h:23
Displacement & operator*=(const Displacement &pDisp)
Defining composition of Displacement with * sign
Quaternion Q
Rotation of the Displacement
Position3D P
Translation of the Displacement
Create and play with a Quaternion.
Definition: alquaternion.h:23
bool isNear(const Displacement &pDisp2, const float pEpsilon=0.0001f) const
Check if the current Displacement is Near the one given in argument.