Program listing for file mechanics/src/collision/native/bodies/SphereNEDS.hpp#
Return to documentation for this file
1#ifndef SphereNEDS_h
2#define SphereNEDS_h
3
4#include <MechanicsFwd.hpp>
5#include "NewtonEulerDS.hpp"
6
7
8class SphereNEDS : public NewtonEulerDS, public std::enable_shared_from_this<SphereNEDS>
9{
10protected:
11 ACCEPT_SERIALIZATION(SphereNEDS);
12
13 double radius;
14
15 SphereNEDS() {};
16
17public:
18
19 SphereNEDS(double, double, SP::SiconosMatrix, SP::SiconosVector, SP::SiconosVector);
20
21 ~SphereNEDS();
22
23 inline double getQ(unsigned int pos)
24 {
25 assert(pos < 7);
26 return (_q->getValue(pos));
27 };
28
29 inline double getVelocity(unsigned int pos)
30 {
31 assert(pos < 6);
32 return (_twist->getValue(pos));
33 };
34
35 inline double getRadius() const
36 {
37 return radius;
38 };
39
40 ACCEPT_BASE_VISITORS(NewtonEulerDS);
41
42};
43#endif