Program listing for file mechanics/src/collision/native/bodies/CircularDS.hpp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef CircularDS_h
#define CircularDS_h

#include "MechanicsFwd.hpp"
#include "LagrangianDS.hpp"

class CircularDS : public LagrangianDS
{
protected:

  ACCEPT_SERIALIZATION(CircularDS);

  double radius;
  double massValue;

  CircularDS(): LagrangianDS() {};

public:

  CircularDS(double, double, SP::SiconosVector, SP::SiconosVector);

  virtual ~CircularDS() {};

  inline double getQ(unsigned int pos)
  {
    assert(pos < _ndof);
    return (*_q[0])(pos);
  };
  inline double getVelocity(unsigned int pos)
  {
    assert(pos < _ndof);
    return (*_q[1])(pos);
  };

  inline double getMassValue() const
  {
    return massValue;
  };

  inline double getRadius() const
  {
    return radius;
  };

};
#endif