dynamics3d_single_body_object_model.h
Go to the documentation of this file.
1 
7 #ifndef DYNAMICS3D_SINGLE_BODY_OBJECT_MODEL_H
8 #define DYNAMICS3D_SINGLE_BODY_OBJECT_MODEL_H
9 
10 namespace argos {
11  class CDynamics3DSingleBodyObjectModel;
12 }
13 
14 #include <argos3/plugins/simulator/physics_engines/dynamics3d/dynamics3d_model.h>
15 
16 #ifdef __APPLE__
17 #pragma clang diagnostic push
18 #pragma clang diagnostic ignored "-Wreorder"
19 #else
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Wreorder"
22 #endif
23 
24 #include <argos3/plugins/simulator/physics_engines/dynamics3d/bullet/BulletDynamics/Dynamics/btRigidBody.h>
25 
26 #ifdef __APPLE__
27 #pragma clang diagnostic pop
28 #else
29 #pragma GCC diagnostic pop
30 #endif
31 
32 namespace argos {
33 
35 
36  public:
37 
38  class CBody : public CAbstractBody {
39 
40  public:
41 
42  CBody(CDynamics3DModel& c_model,
43  SAnchor* ps_anchor,
44  const std::shared_ptr<btCollisionShape>& ptr_shape,
45  const SData& s_data);
46 
47  virtual ~CBody() {}
48 
49  virtual void Reset();
50 
51  virtual void AddToWorld(btMultiBodyDynamicsWorld& c_world);
52 
53  virtual void RemoveFromWorld(btMultiBodyDynamicsWorld& c_world);
54 
55  virtual void ApplyForce(const btVector3& c_force);
56 
57  virtual void ApplyForce(const btVector3& c_force,
58  const btVector3& c_offset);
59 
60  virtual void ApplyTorque(const btVector3& c_torque);
61 
62  virtual btTransform& GetTransform();
63 
64  protected:
65 
66  btRigidBody m_cRigidBody;
67 
68  };
69 
70  public:
71 
73  CComposableEntity& c_entity);
74 
76 
77  virtual void Reset();
78 
79  virtual void MoveTo(const CVector3& c_position,
80  const CQuaternion& c_orientation);
81 
82  virtual void CalculateBoundingBox();
83 
84  virtual void AddToWorld(btMultiBodyDynamicsWorld& c_world);
85 
86  virtual void RemoveFromWorld(btMultiBodyDynamicsWorld& c_world);
87 
88  };
89 }
90 
91 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
Basic class for an entity that contains other entities.
An anchor related to the body of an entity.
Definition: physics_model.h:38
A 3D vector class.
Definition: vector3.h:31
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
virtual void AddToWorld(btMultiBodyDynamicsWorld &c_world)
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
CDynamics3DSingleBodyObjectModel(CDynamics3DEngine &c_engine, CComposableEntity &c_entity)
virtual void RemoveFromWorld(btMultiBodyDynamicsWorld &c_world)
virtual void AddToWorld(btMultiBodyDynamicsWorld &c_world)
virtual void RemoveFromWorld(btMultiBodyDynamicsWorld &c_world)
CBody(CDynamics3DModel &c_model, SAnchor *ps_anchor, const std::shared_ptr< btCollisionShape > &ptr_shape, const SData &s_data)