libalmath  2.1.4.13
 All Classes Namespaces Functions Variables Typedefs Groups Pages
alpositionandvelocity.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 _LIBALMATH_ALMATH_TYPES_ALPOSITIONANDVELOCITY_H_
10 #define _LIBALMATH_ALMATH_TYPES_ALPOSITIONANDVELOCITY_H_
11 
12 #include <vector>
13 
14 namespace AL {
15  namespace Math {
16 
24  {
26  float q;
28  float dq;
29 
32 
47  const float pq = 0.0f,
48  const float pdq = 0.0f);
49 
60  bool isNear(
61  const PositionAndVelocity& pDat2,
62  const float& pEpsilon=0.0001f) const;
63 
64 
68  void toVector(std::vector<float>& pReturnVector) const;
69  std::vector<float> toVector(void) const;
70  };
71 
72  }
73 }
74 #endif // _LIBALMATH_ALMATH_TYPES_ALPOSITIONANDVELOCITY_H_
Create and play with a PositionAndVelocity.
PositionAndVelocity(const float pq=0.0f, const float pdq=0.0f)
Create a PositionAndVelocity initialize with explicit value.
void toVector(std::vector< float > &pReturnVector) const
Return the PositionAndVelocity as a vector of float [q, dq].
bool isNear(const PositionAndVelocity &pDat2, const float &pEpsilon=0.0001f) const
Check if the actual PositionAndVelocity is near the one give in argument.