loop_functions.cpp
Go to the documentation of this file.
1 
7 #include "loop_functions.h"
8 #include <argos3/core/utility/plugins/factory.h>
9 #include <argos3/core/simulator/entity/positional_entity.h>
10 #include <argos3/core/simulator/entity/embodied_entity.h>
11 
12 namespace argos {
13 
14  /****************************************/
15  /****************************************/
16 
18  const CVector3& c_position,
19  const CQuaternion& c_orientation) {
20  c_entity.MoveTo(c_position, c_orientation);
21  }
22 
23  /****************************************/
24  /****************************************/
25 
27  const CVector3& c_position,
28  const CQuaternion& c_orientation,
29  bool b_check_only,
30  bool b_ignore_collisions) {
31  return c_entity.MoveTo(c_position, c_orientation, b_check_only, b_ignore_collisions);
32  }
33 
34  /****************************************/
35  /****************************************/
36 
38  CallEntityOperation<CSpaceOperationAddEntity, CSpace, void>(m_cSpace, c_entity);
39  }
40 
41  /****************************************/
42  /****************************************/
43 
44  void CLoopFunctions::RemoveEntity(const std::string& str_entity_id) {
45  CEntity& entity = m_cSpace.GetEntity(str_entity_id);
46  RemoveEntity(entity);
47  }
48 
49  /****************************************/
50  /****************************************/
51 
53  CallEntityOperation<CSpaceOperationRemoveEntity, CSpace, void>(m_cSpace, c_entity);
54  }
55 
56  /****************************************/
57  /****************************************/
58 
59 }
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
This entity is a link to a body in the physics engine.
virtual bool MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation, bool b_check_only=false, bool b_ignore_collisions=false)
Moves the entity to the wanted position and orientation.
The basic entity type.
Definition: entity.h:90
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
virtual void RemoveEntity(const std::string &str_entity_id)
Removes an entity from the simulation.
virtual void MoveEntity(CPositionalEntity &c_entity, const CVector3 &c_position, const CQuaternion &c_orientation)
Moves the entity to the wanted position and orientation.
virtual void AddEntity(CEntity &c_entity)
Adds the passed entity to the simulation.
CEntity & GetEntity(const std::string &str_id)
Returns the entity with the given id.
Definition: space.h:160
A 3D vector class.
Definition: vector3.h:31