fwd.hpp 3.41 KB
Newer Older
1
//
2
// Copyright (c) 2015-2018 CNRS
3
// Copyright (c) 2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4
5
//

6
7
#ifndef __pinocchio_spatial_fwd_hpp__
#define __pinocchio_spatial_fwd_hpp__
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
8

9
#include "pinocchio/fwd.hpp"
10
11
#include "pinocchio/macros.hpp"

12
namespace pinocchio
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
13
{
14
  
15
  template<typename Scalar, int Options=0> struct SE3Tpl;
16
17
18
19

  template<typename Derived> class MotionBase;
  template<typename Derived> class MotionDense;
  template<typename Vector6ArgType> class MotionRef;
20
  template<typename Scalar, int Options=0> class MotionTpl;
21
22
  template<typename Scalar, int Options=0> struct MotionZeroTpl;
  template<typename Scalar, int Options=0> struct PINOCCHIO_DEPRECATED BiasZeroTpl;
23
24
25
26
  
  template<typename Derived> class ForceBase;
  template<typename Derived> class ForceDense;
  template<typename Vector6ArgType> class ForceRef;
27
  template<typename Scalar, int Options=0> class ForceTpl;
28
  
29
30
  template<typename Scalar, int Options=0> class InertiaTpl;
  template<typename Scalar, int Options=0> class Symmetric3Tpl;
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  
  namespace internal
  {
    /// \brief Default return type for the operation: Type*Scalar
    template<typename Type, typename Scalar>
    struct RHSScalarMultiplication
    {
      typedef Type ReturnType;
    };
    
    /// \brief Default return type for the operation: Scalar*Type
    template<typename Type, typename Scalar>
    struct LHSScalarMultiplication
    {
      typedef Type ReturnType;
    };
  }
48

49
50
51
52
53
  /**
   * \addtogroup spatial
   * @{
   */

54
55
56
57
58
  typedef SE3Tpl        <double,0> SE3;
  typedef MotionTpl     <double,0> Motion;
  typedef ForceTpl      <double,0> Force;
  typedef InertiaTpl    <double,0> Inertia;
  typedef Symmetric3Tpl <double,0> Symmetric3;
59
60
61
62
  typedef MotionZeroTpl <double,0> MotionZero;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63
  typedef BiasZeroTpl   <double,0> BiasZero;
64
#pragma GCC diagnostic pop
65

66
67
68
69
70
  /**
   * @}
   */
  // end of group spatial

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  #define SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,TYPENAME)              \
    typedef TYPENAME traits<derived>::Scalar Scalar; \
    typedef TYPENAME traits<derived>::Vector3 Vector3; \
    typedef TYPENAME traits<derived>::Vector4 Vector4; \
    typedef TYPENAME traits<derived>::Vector6 Vector6; \
    typedef TYPENAME traits<derived>::Matrix3 Matrix3; \
    typedef TYPENAME traits<derived>::Matrix4 Matrix4; \
    typedef TYPENAME traits<derived>::Matrix6 Matrix6; \
    typedef TYPENAME traits<derived>::Angular_t Angular_t; \
    typedef TYPENAME traits<derived>::Linear_t Linear_t; \
    typedef TYPENAME traits<derived>::ConstAngular_t ConstAngular_t; \
    typedef TYPENAME traits<derived>::ConstLinear_t ConstLinear_t; \
    typedef TYPENAME traits<derived>::ActionMatrix_t ActionMatrix_t; \
    typedef TYPENAME traits<derived>::Quaternion_t Quaternion_t; \
    typedef TYPENAME traits<derived>::SE3 SE3; \
    typedef TYPENAME traits<derived>::Force Force; \
    typedef TYPENAME traits<derived>::Motion Motion; \
    typedef TYPENAME traits<derived>::Symmetric3 Symmetric3; \
89
90
91
92
    enum {  \
      LINEAR = traits<derived>::LINEAR,  \
      ANGULAR = traits<derived>::ANGULAR   \
    }
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
93

94
95
96
  #define SPATIAL_TYPEDEF_TEMPLATE(derived)                 \
    SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,typename)
  
97
  #define SPATIAL_TYPEDEF_NO_TEMPLATE(derived)              \
98
    SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,PINOCCHIO_MACRO_EMPTY_ARG)
Valenza Florian's avatar
Valenza Florian committed
99
100


101
} // namespace pinocchio
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
102

103
#endif // ifndef __pinocchio_spatial_fwd_hpp__