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

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

 1#ifndef SphereNEDSPlanR_h
 2#define SphereNEDSPlanR_h
 3
 4#include "MechanicsFwd.hpp"
 5#include "NewtonEuler3DR.hpp"
 6
 7class SphereNEDSPlanR : public NewtonEuler3DR,
 8                        public std::enable_shared_from_this<SphereNEDSPlanR> {
 9private:
10  ACCEPT_SERIALIZATION(SphereNEDSPlanR);
11
12
13  double r, A, B, C, D, nN, nU;
14
15  double u1, u2, u3, v1, v2, v3, n1, n2, n3, ru1, ru2, ru3, rv1, rv2, rv3;
16
17  SphereNEDSPlanR(){};
18
19public:
20
21  SphereNEDSPlanR(double r, double A, double B, double C, double D);
22
23  double distance(double, double, double, double);
24
25
26  void computeh(double time, const BlockVector &q0, SiconosVector &y) override;
27
28
29
30  bool equal(double _A, double _B, double _C, double _D, double _r) const {
31    return (A == _A && B == _B && C == _C && D == _D && r == _r);
32  }
33
34  ACCEPT_VISITORS();
35};
36#endif