Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00814_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00814_source.php on line 2
The ARGoS Website

dynamics2d_single_body_object_model.h
Go to the documentation of this file.
1 
7 #ifndef DYNAMICS2D_SINGLE_BODY_OBJECT_MODEL_H
8 #define DYNAMICS2D_SINGLE_BODY_OBJECT_MODEL_H
9 
10 namespace argos {
11  class CDynamics2DSingleBodyObjectModel;
12 }
13 
14 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_model.h>
15 #include <argos3/plugins/simulator/physics_engines/dynamics2d/chipmunk-physics/include/chipmunk.h>
16 
17 namespace argos {
18 
48 
49  public:
50 
58  CComposableEntity& c_entity);
59 
65 
71  return m_cEntity;
72  }
73 
78  inline const CComposableEntity& GetComposableEntity() const {
79  return m_cEntity;
80  }
81 
86  inline cpBody* GetBody() {
87  return m_ptBody;
88  }
89 
94  inline const cpBody* GetBody() const {
95  return m_ptBody;
96  }
97 
98  virtual void Reset();
99 
100  virtual void MoveTo(const CVector3& c_position,
101  const CQuaternion& c_orientation);
102 
103  virtual void CalculateBoundingBox();
104 
105  virtual void UpdateEntityStatus();
106 
107  virtual void UpdateFromEntityStatus() = 0;
108 
109  virtual bool IsCollidingWithSomething() const;
110 
133  virtual void SetBody(cpBody* pt_body,
134  Real f_height);
135 
139  void UpdateOriginAnchor(SAnchor& s_anchor);
140 
141  private:
142 
143  CComposableEntity& m_cEntity;
144  cpBody* m_ptBody;
145  };
146 
147 }
148 
149 #endif
cpBody * GetBody()
Returns the body as non-const pointer.
A 3D vector class.
Definition: vector3.h:29
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
const cpBody * GetBody() const
Returns the body as const pointer.
virtual void SetBody(cpBody *pt_body, Real f_height)
Sets the body and registers the default origin anchor method.
virtual void UpdateFromEntityStatus()=0
Updates the state of this model from the status of the associated entity.
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
Basic class for an entity that contains other entities.
void UpdateOriginAnchor(SAnchor &s_anchor)
Updates the origin anchor associated to the embodied entity.
An anchor related to the body of an entity.
Definition: physics_model.h:38
virtual bool IsCollidingWithSomething() const
Returns true if this model is colliding with another model.
CComposableEntity & GetComposableEntity()
Returns the associated composable entity as a non-const reference.
Base class for object models with a single body.
The base class for models in the dynamics 2D engine.
const CComposableEntity & GetComposableEntity() const
Returns the associated composable entity as a const reference.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
CDynamics2DSingleBodyObjectModel(CDynamics2DEngine &c_engine, CComposableEntity &c_entity)
Class constructor.
virtual void UpdateEntityStatus()
Updates the status of the associated entity.