dynamics2d_engine.h File Reference
#include <argos3/core/simulator/entity/controllable_entity.h>
#include <argos3/core/simulator/physics_engine/physics_engine.h>
#include <argos3/plugins/simulator/physics_engines/dynamics2d/chipmunk-physics/include/chipmunk.h>
Include dependency graph for dynamics2d_engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  argos::SDynamics2DEngineGripperData
 
class  argos::CDynamics2DEngine
 
class  argos::CDynamics2DOperation< ACTION >
 
class  argos::CDynamics2DOperationAddEntity
 
class  argos::CDynamics2DOperationRemoveEntity
 

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Macros

#define REGISTER_DYNAMICS2D_OPERATION(ACTION, OPERATION, ENTITY)    REGISTER_ENTITY_OPERATION(ACTION, CDynamics2DEngine, OPERATION, SOperationOutcome, ENTITY);
 
#define REGISTER_STANDARD_DYNAMICS2D_OPERATION_ADD_ENTITY(SPACE_ENTITY, DYN2D_MODEL)
 
#define REGISTER_STANDARD_DYNAMICS2D_OPERATION_REMOVE_ENTITY(SPACE_ENTITY)
 
#define REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY(SPACE_ENTITY, DYN2D_ENTITY)
 

Macro Definition Documentation

◆ REGISTER_DYNAMICS2D_OPERATION

#define REGISTER_DYNAMICS2D_OPERATION (   ACTION,
  OPERATION,
  ENTITY 
)     REGISTER_ENTITY_OPERATION(ACTION, CDynamics2DEngine, OPERATION, SOperationOutcome, ENTITY);

Definition at line 175 of file dynamics2d_engine.h.

◆ REGISTER_STANDARD_DYNAMICS2D_OPERATION_ADD_ENTITY

#define REGISTER_STANDARD_DYNAMICS2D_OPERATION_ADD_ENTITY (   SPACE_ENTITY,
  DYN2D_MODEL 
)
Value:
class CDynamics2DOperationAdd ## SPACE_ENTITY : public CDynamics2DOperationAddEntity { \
public: \
CDynamics2DOperationAdd ## SPACE_ENTITY() {} \
virtual ~CDynamics2DOperationAdd ## SPACE_ENTITY() {} \
SOperationOutcome ApplyTo(CDynamics2DEngine& c_engine, \
SPACE_ENTITY& c_entity) { \
auto* pcPhysModel = new DYN2D_MODEL(c_engine, \
c_entity); \
c_engine.AddPhysicsModel(c_entity.GetId(), \
*pcPhysModel); \
c_entity. \
GetComponent<CEmbodiedEntity>("body"). \
AddPhysicsModel(c_engine.GetId(), *pcPhysModel); \
return SOperationOutcome(true); \
} \
}; \
REGISTER_DYNAMICS2D_OPERATION(CDynamics2DOperationAddEntity, \
CDynamics2DOperationAdd ## SPACE_ENTITY, \
SPACE_ENTITY);

Definition at line 178 of file dynamics2d_engine.h.

◆ REGISTER_STANDARD_DYNAMICS2D_OPERATION_REMOVE_ENTITY

#define REGISTER_STANDARD_DYNAMICS2D_OPERATION_REMOVE_ENTITY (   SPACE_ENTITY)
Value:
class CDynamics2DOperationRemove ## SPACE_ENTITY : public CDynamics2DOperationRemoveEntity { \
public: \
CDynamics2DOperationRemove ## SPACE_ENTITY() {} \
virtual ~CDynamics2DOperationRemove ## SPACE_ENTITY() {} \
SOperationOutcome ApplyTo(CDynamics2DEngine& c_engine, \
SPACE_ENTITY& c_entity) { \
c_engine.RemovePhysicsModel(c_entity.GetId()); \
c_entity. \
GetComponent<CEmbodiedEntity>("body"). \
RemovePhysicsModel(c_engine.GetId()); \
return SOperationOutcome(true); \
} \
}; \
REGISTER_DYNAMICS2D_OPERATION(CDynamics2DOperationRemoveEntity, \
CDynamics2DOperationRemove ## SPACE_ENTITY, \
SPACE_ENTITY);

Definition at line 199 of file dynamics2d_engine.h.

◆ REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY

#define REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY (   SPACE_ENTITY,
  DYN2D_ENTITY 
)
Value:
REGISTER_STANDARD_DYNAMICS2D_OPERATION_REMOVE_ENTITY(SPACE_ENTITY)
#define REGISTER_STANDARD_DYNAMICS2D_OPERATION_ADD_ENTITY(SPACE_ENTITY, DYN2D_MODEL)

Definition at line 217 of file dynamics2d_engine.h.