Atoms Crowd  7.0.0
InstanceModule.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 <map>
12 
13 namespace AtomsModules
14 {
16  {
17  public:
18 
20 
21  virtual ~InstanceModule();
22 
23  void initSimulation(Atoms::AgentGroup* agentGroup);
24  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup);
25  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup);
26 
27  static Atoms::BehaviourModule* creator(const std::string& parameter);
28 
29  AtomsPtr<Atoms::AgentGroup> getAgentGroup(Atoms::AgentGroup* agentGroup, const std::string &agName);
30 
31  private:
32  AtomsCore::Rand32 m_rand;
33  std::map<int, int> m_groupIds;
34  std::map<int, int> m_syncGroupIds;
35 
36  std::vector<std::string> m_syncMetadata;
37 
38  bool m_isSync;
39 
40  };
41 }
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: InstanceModule.h:16
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup)
Agents Created.
void initSimulation(Atoms::AgentGroup *agentGroup)
Init simulation.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup)
Init frame.