multi-bound.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_MultiBound_H__
11 #define __SOT_MultiBound_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* STD */
18 #include <string>
19 #include <vector>
20 
21 /* SOT */
23 
25 
26 #include "sot/core/api.hh"
27 
28 /* --------------------------------------------------------------------- */
29 /* --- CLASS ----------------------------------------------------------- */
30 /* --------------------------------------------------------------------- */
31 
32 namespace dynamicgraph {
33 namespace sot {
34 
36  public:
37  enum MultiBoundModeType { MODE_SINGLE, MODE_DOUBLE };
38  enum SupInfType { BOUND_SUP, BOUND_INF };
39 
40  public: // protected:
42  double boundSingle;
43  double boundSup, boundInf;
44  bool boundSupSetup, boundInfSetup;
45 
46  public:
47  MultiBound(const double x = 0.);
48  MultiBound(const double xi, const double xs);
49  MultiBound(const double x, const SupInfType bound);
50  MultiBound(const MultiBound &clone);
51 
52  public: // Acessors
53  MultiBoundModeType getMode(void) const;
54  double getSingleBound(void) const;
55  double getDoubleBound(const SupInfType bound) const;
56  bool getDoubleBoundSetup(const SupInfType bound) const;
57 
58  public: // Modifiors
59  void setDoubleBound(SupInfType boundType, double boundValue);
60  void unsetDoubleBound(SupInfType boundType);
61  void setSingleBound(double boundValue);
62 
63  public:
64  SOT_CORE_EXPORT friend std::ostream &operator<<(std::ostream &os,
65  const MultiBound &m);
66  SOT_CORE_EXPORT friend std::istream &operator>>(std::istream &is,
67  MultiBound &m);
68 };
69 
70 /* --------------------------------------------------------------------- */
71 typedef std::vector<MultiBound> VectorMultiBound;
72 SOT_CORE_EXPORT std::ostream &operator<<(std::ostream &os,
73  const VectorMultiBound &v);
74 SOT_CORE_EXPORT std::istream &operator>>(std::istream &os, VectorMultiBound &v);
75 
76 } /* namespace sot */
77 
78 template <>
79 struct signal_io<sot::MultiBound> : signal_io_unimplemented<sot::MultiBound> {};
80 } /* namespace dynamicgraph */
81 
82 #endif // #ifndef __SOT_MultiBound_H__
SOT_CORE_EXPORT std::istream & operator>>(std::istream &os, VectorMultiBound &v)
virtual CollisionGeometry * clone() const=0
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:71
#define SOT_CORE_EXPORT
Definition: api.hh:20
MultiBoundModeType mode
Definition: multi-bound.hh:41
SOT_CORE_EXPORT std::ostream & operator<<(std::ostream &os, const VectorMultiBound &v)


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26