7#ifndef DYNAMICS2D_MULTI_BODY_OBJECT_MODEL_H
8#define DYNAMICS2D_MULTI_BODY_OBJECT_MODEL_H
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;
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
CDynamics2DModel(CDynamics2DEngine &c_engine, CEmbodiedEntity &c_entity)
Base class for object models with multiple bodies.
SBody & GetBody(size_t i)
Returns the i-th body associated to the model.
const SBody & GetBody(size_t i) const
Returns the i-th body associated to the model.
CDynamics2DMultiBodyObjectModel(CDynamics2DEngine &c_engine, CComposableEntity &c_entity)
Class constructor.
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
virtual void AddBody(cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)
Adds a body.
CComposableEntity & GetComposableEntity()
Returns the associated composable entity as a non-const reference.
virtual bool IsCollidingWithSomething() const
Returns true if this model is colliding with another model.
virtual ~CDynamics2DMultiBodyObjectModel()
Class destructor.
const CComposableEntity & GetComposableEntity() const
Returns the associated composable entity as a const reference.
virtual void UpdateFromEntityStatus()=0
Updates the state of this model from the status of the associated entity.
SBody(cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)