ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
7 #ifndef DYNAMICS2D_MULTI_BODY_OBJECT_MODEL_H
8 #define DYNAMICS2D_MULTI_BODY_OBJECT_MODEL_H
11 class CDynamics2DMultiBodyObjectModel;
14 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_model.h>
15 #include <argos3/plugins/simulator/physics_engines/dynamics2d/chipmunk-physics/include/chipmunk.h>
53 SBody(cpBody* pt_body,
54 const cpVect& t_offset_pos,
55 cpFloat t_offset_orient,
97 return m_vecBodies[i];
105 return m_vecBodies[i];
108 virtual void Reset();
143 virtual void AddBody(cpBody* pt_body,
144 const cpVect& t_offset_pos,
145 cpFloat t_offset_orient,
151 std::vector<SBody> m_vecBodies;
Base class for object models with multiple bodies.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
virtual void AddBody(cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)
Adds a body.
virtual ~CDynamics2DMultiBodyObjectModel()
Class destructor.
SBody(cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)
CComposableEntity & GetComposableEntity()
Returns the associated composable entity as a non-const reference.
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
const SBody & GetBody(size_t i) const
Returns the i-th body associated to the model.
virtual void UpdateFromEntityStatus()=0
Updates the state of this model from the status of the associated entity.
SBody & GetBody(size_t i)
Returns the i-th body associated to the model.
The base class for models in the dynamics 2D engine.
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
virtual bool IsCollidingWithSomething() const
Returns true if this model is colliding with another model.
const CComposableEntity & GetComposableEntity() const
Returns the associated composable entity as a const reference.
float Real
Collects all ARGoS code.
CDynamics2DMultiBodyObjectModel(CDynamics2DEngine &c_engine, CComposableEntity &c_entity)
Class constructor.