pinocchio  UNKNOWN
spatial/fwd.hpp
1 //
2 // Copyright (c) 2015-2018 CNRS
3 // Copyright (c) 2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 // This file is part of Pinocchio
6 // Pinocchio is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // Pinocchio is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // Pinocchio If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef __se3_fwd_hpp__
20 #define __se3_fwd_hpp__
21 
22 #include "pinocchio/macros.hpp"
23 
24 namespace se3
25 {
26 
27  template<typename _Scalar, int _Options=0> class SE3Tpl;
28 
29  template<typename Derived> class MotionBase;
30  template<typename Derived> class MotionDense;
31  template<typename Vector6ArgType> class MotionRef;
32  template<typename _Scalar, int _Options=0> class MotionTpl;
33  struct BiasZero;
34 
35  template<typename Derived> class ForceBase;
36  template<typename Derived> class ForceDense;
37  template<typename Vector6ArgType> class ForceRef;
38  template<typename _Scalar, int _Options=0> class ForceTpl;
39 
40  template<typename _Scalar, int _Options=0> class InertiaTpl;
41  template<typename _Scalar, int _Options=0> class Symmetric3Tpl;
42 
43  typedef SE3Tpl <double,0> SE3;
45  typedef ForceTpl <double,0> Force;
48 
49  template<class C> struct traits {};
50 
51  #define SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,TYPENAME) \
52  typedef TYPENAME traits<derived>::Scalar Scalar; \
53  typedef TYPENAME traits<derived>::Vector3 Vector3; \
54  typedef TYPENAME traits<derived>::Vector4 Vector4; \
55  typedef TYPENAME traits<derived>::Vector6 Vector6; \
56  typedef TYPENAME traits<derived>::Matrix3 Matrix3; \
57  typedef TYPENAME traits<derived>::Matrix4 Matrix4; \
58  typedef TYPENAME traits<derived>::Matrix6 Matrix6; \
59  typedef TYPENAME traits<derived>::Angular_t Angular_t; \
60  typedef TYPENAME traits<derived>::Linear_t Linear_t; \
61  typedef TYPENAME traits<derived>::ConstAngular_t ConstAngular_t; \
62  typedef TYPENAME traits<derived>::ConstLinear_t ConstLinear_t; \
63  typedef TYPENAME traits<derived>::ActionMatrix_t ActionMatrix_t; \
64  typedef TYPENAME traits<derived>::Quaternion_t Quaternion_t; \
65  typedef TYPENAME traits<derived>::SE3 SE3; \
66  typedef TYPENAME traits<derived>::Force Force; \
67  typedef TYPENAME traits<derived>::Motion Motion; \
68  typedef TYPENAME traits<derived>::Symmetric3 Symmetric3; \
69  enum { \
70  LINEAR = traits<derived>::LINEAR, \
71  ANGULAR = traits<derived>::ANGULAR \
72  }
73 
74  #define SPATIAL_TYPEDEF_TEMPLATE(derived) \
75  SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,typename)
76 
77  #define SPATIAL_TYPEDEF_NO_TEMPLATE(derived) \
78  SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,PINOCCHIO_MACRO_EMPTY_ARG)
79 
80 
81 } // namespace se3
82 
83 #endif // ifndef __se3_fwd_hpp__
Base interface for forces representation.
Definition: force-base.hpp:40