Program listing for file mechanics/src/collision/BodyShapeRecord.hpp

Program listing for file mechanics/src/collision/BodyShapeRecord.hpp#

 1#ifndef BodyShapeRecord_h
 2#define BodyShapeRecord_h
 3
 4
 5
 6
 7
 8class BodyShapeRecord {
 9public:
10  BodyShapeRecord(SP::SiconosVector b, SP::SecondOrderDS d, SP::SiconosShape sh,
11                  SP::SiconosContactor con, SP::StaticBody staticCSR)
12      : base(b), ds(d), sshape(sh), contactor(con),
13        shape_version(sh->version()), staticBody(staticCSR)
14  {
15  }
16  virtual ~BodyShapeRecord() {}
17
18  SP::SiconosVector base;
19  SP::SecondOrderDS ds;
20  SP::SiconosShape sshape;
21  SP::SiconosContactor contactor;
22  unsigned int shape_version;
23  SP::StaticBody staticBody;
24
25
26  void display() const
27  {
28    std::cout << "BodyShapeRecord display" << std::endl;
29
30    if (ds)
31    {
32      std::cout << "ds number: " << ds->number() << std::endl;
33    }
34    if (staticBody)
35    {
36      std::cout << "static Body number :" << staticBody->number << std::endl;
37    }
38
39  };
40
41
42  VIRTUAL_ACCEPT_VISITORS();
43};
44
45#endif