10 #include <Atoms/Globals.h>
11 #include <Atoms/AgentTypes.h>
12 #include <AtomsCore/Globals.h>
13 #include <Atoms/AgentType.h>
14 #include <Atoms/BehaviourModuleAttributeCache.h>
15 #include <Atoms/AgentInitData.h>
20 class LayoutGenerator;
22 typedef AtomsPtr<LayoutGenerator> LayoutGeneratorPtr;
53 inline bool isStaticGenerator()
const;
56 inline void setAsStaticGenerator(
bool value);
59 virtual std::vector<AgentInitData>
generate(
double time) = 0;
62 virtual inline AgentTypePtr agentType(
const int groupId,
const std::string& groupIdStr);
70 inline std::atomic<size_t>& nextFreeId();
72 inline const std::atomic<size_t>& nextFreeId()
const;
75 inline void setName(
const std::string &name);
78 inline const std::string &name();
119 std::atomic<size_t> m_nextFreeId;
121 bool m_staticGenerator;
129 #include "LayoutGenerator.impl.h"
Layout generator.
Definition: LayoutGenerator.h:31
void setGroupIdOffset(const int offset)
Set the offset for the group ids of this layout generator.
void setOffsetPelvisHeightOverride(const std::map< int, bool > &value)
Sets the map per agent to offset height according to the distance between pelvis and foot.
virtual bool mustBeFirst()
Returns wheter this layout generator should be the first one in the stack.
virtual bool allowMultiple()
Returns whether an Agent Group can have multiple instances of this layout generator.
void setOffsetPelvisHeight(bool state)
Sets the flag to offset height according to the distance between pelvis and foot.
virtual ~LayoutGenerator()
Destructor.
const int groupIdOffset()
Get the offset for the group ids of this layout generator.
virtual std::vector< AgentInitData > generate(double time)=0
Generate a vector of agent init data.
virtual bool allowMultiLayoutGenerator()
Returns whether this layout generator can work in conjunction with other layout generators.
static const std::string getDefaultAgentType()
Get the default agent type name.
virtual const char * typeName()=0
Get the type name for this generator.
LayoutGenerator(bool isStatic=true)
Constructor.
Atoms namespace.
Definition: Agent.h:29
AtomsPtr< AgentType > AgentTypePtr
Agent type pointer.
Definition: AgentType.h:17