Atoms Crowd  7.0.0
CopyMetadataModule.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <Atoms/BehaviourModule.h>
11 #include <unordered_map>
12 
13 namespace AtomsModules
14 {
16  {
17  public:
18 
19  enum SimulationEventType
20  {
21  kAgentsCreated = 0,
22  kInitFrame,
23  kEndFrame,
24  kPrePhysics,
25  kPostPyisics
26  };
27 
29 
31 
32  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
33 
34  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
35 
36  void endFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
37 
38  void prePhysics(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
39 
40  void postPhysics(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
41 
42  static Atoms::BehaviourModule* creator(const std::string& parameter);
43 
44  void copyData(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr, unsigned int event = SimulationEventType::kAgentsCreated);
45 
46  };
47 }
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: CopyMetadataModule.h:16
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
void prePhysics(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Pre Physics.
void postPhysics(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Post Physics.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Agents Created.