Atoms Crowd  7.0.0
DynamicLayoutGenerator.impl.h
1 // ===========================================================================
2 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
3 //
4 // Use of this software is subject to the terms of the Toolchefs license
5 // agreement provided at the time of installation or download, or which
6 // otherwise accompanies this software in either electronic or hard copy form.
7 // ===========================================================================
8 
9 namespace Atoms
10 {
11  unsigned int DynamicLayoutGenerator::dynamicGroupIdOffset() const
12  {
13  return m_dynamicGroupIdOffset;
14  }
15 
16  void DynamicLayoutGenerator::setDynamicGroupIdOffset(unsigned int value)
17  {
18  m_dynamicGroupIdOffset = value;
19  }
20 
21  void DynamicLayoutGenerator::addDynamicGroupIdOffset(unsigned int value)
22  {
23  m_dynamicGroupIdOffset += value;
24  }
25 
26  unsigned int DynamicLayoutGenerator::dynamicMethod() const
27  {
28  return m_dynamicMethod;
29  }
30 
31  void DynamicLayoutGenerator::setDynamicMethod(unsigned int value)
32  {
33  m_dynamicMethod = value;
34  }
35 
36  bool DynamicLayoutGenerator::generateOnInitSimulation() const
37  {
38  return m_generateOnInit;
39  }
40 
41  void DynamicLayoutGenerator::setGenerateOnInitSimulation(bool value)
42  {
43  m_generateOnInit = value;
44  }
45 
46  double DynamicLayoutGenerator::timeToGenerate() const
47  {
48  return m_timeToGenerate;
49  }
50 
51  void DynamicLayoutGenerator::setTimeToGenerate(double value)
52  {
53  m_timeToGenerate = value;
54  }
55 
56  void DynamicLayoutGenerator::decreaseTimeToGenerate()
57  {
58  m_timeToGenerate -= 1.0;
59  }
60 
61  bool DynamicLayoutGenerator::generatorTrigger() const
62  {
63  return m_generatorTrigger;
64  }
65 
66  void DynamicLayoutGenerator::setGeneratorTrigger(bool value)
67  {
68  m_generatorTrigger = value;
69  }
70 
71  bool DynamicLayoutGenerator::randomizeAgentTypes() const
72  {
73  return m_randomizeAgentTypes;
74  }
75 
76  void DynamicLayoutGenerator::setRandomizeAgentTypes(bool value)
77  {
78  m_randomizeAgentTypes = value;
79  }
80 
81  bool DynamicLayoutGenerator::resetSeed() const
82  {
83  return m_resetSeed;
84  }
85 
86  void DynamicLayoutGenerator::setResetSeed(bool value)
87  {
88  m_resetSeed = value;
89  }
90 
91  const std::vector<std::string>& DynamicLayoutGenerator::randomAgentTypes() const
92  {
93  return m_randomAgentTypes;
94  }
95 
96  void DynamicLayoutGenerator::setRandomAgentTypes(const std::vector<std::string>& value)
97  {
98  m_randomAgentTypes = value;
99  }
100 
101  const AtomsCore::Vector2& DynamicLayoutGenerator::randomTimer() const
102  {
103  return m_randomTimerGenerator;
104  }
105 
106  void DynamicLayoutGenerator::setRandomTimer(const AtomsCore::Vector2& value)
107  {
108  m_randomTimerGenerator = value;
109  }
110 
111  const std::vector<Atoms::AgentInitData>& DynamicLayoutGenerator::getData() const
112  {
113  return m_data;
114  }
115 
116  void DynamicLayoutGenerator::setData(const std::vector<Atoms::AgentInitData>& data, bool check)
117  {
118  if (!check || (check && m_resetSeed && m_data.empty()))
119  m_data = data;
120  }
121 
122 }
AtomsMath::Vector2 Vector2
Vector2 class.
Definition: AtomsMath.h:54
Atoms namespace.
Definition: Agent.h:29