space_no_threads.cpp
Go to the documentation of this file.
1 
11 #include "space_no_threads.h"
12 #include <argos3/core/simulator/simulator.h>
13 
14 namespace argos {
15 
16  /****************************************/
17  /****************************************/
18 
20  for(size_t i = 0; i < m_vecControllableEntities.size(); ++i) {
21  if(m_vecControllableEntities[i]->IsEnabled())
22  m_vecControllableEntities[i]->Act();
23  }
24  }
25 
26  /****************************************/
27  /****************************************/
28 
30  /* Update the physics engines */
31  for(size_t i = 0; i < m_ptPhysicsEngines->size(); ++i) {
32  (*m_ptPhysicsEngines)[i]->Update();
33  }
34  /* Perform entity transfer from engine to engine, if needed */
35  for(size_t i = 0; i < m_ptPhysicsEngines->size(); ++i) {
36  if((*m_ptPhysicsEngines)[i]->IsEntityTransferNeeded()) {
37  (*m_ptPhysicsEngines)[i]->TransferEntities();
38  }
39  }
40  }
41 
42  /****************************************/
43  /****************************************/
44 
46  for(size_t i = 0; i < m_ptMedia->size(); ++i) {
47  (*m_ptMedia)[i]->Update();
48  }
49  }
50 
51  /****************************************/
52  /****************************************/
53 
55  for(size_t i = 0; i < m_vecControllableEntities.size(); ++i) {
56  if(m_vecControllableEntities[i]->IsEnabled()) {
57  m_vecControllableEntities[i]->Sense();
58  m_vecControllableEntities[i]->ControlStep();
59  }
60  }
61  }
62 
63  /****************************************/
64  /****************************************/
65 
66 }
CMedium::TVector * m_ptMedia
A pointer to the list of media.
Definition: space.h:454
virtual void UpdateControllableEntitiesAct()
virtual void UpdateControllableEntitiesSenseStep()
CPhysicsEngine::TVector * m_ptPhysicsEngines
A pointer to the list of physics engines.
Definition: space.h:451
virtual void UpdatePhysics()
CControllableEntity::TVector m_vecControllableEntities
A vector of controllable entities.
Definition: space.h:445
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12