Atoms Crowd  7.0.0
FollowAgentModule.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 <AtomsCore/Metadata/Vector3Metadata.h>
12 
13 namespace AtomsModules
14 {
16  {
17  public:
18 
19  struct DebugData
20  {
22  AtomsCore::Vector3 destPos;
23  int targetId;
24  bool valid;
25  };
26 
28 
30 
31  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
32 
33  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
34 
35  void endFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
36 
37  void preDraw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
38 
39  void draw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
40 
41  static Atoms::BehaviourModule* creator(const std::string& parameter);
42 
43  private:
44 
45  std::vector<DebugData> m_debugData;
46 
47  bool m_activeDraw;
48 
49  };
50 }
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: FollowAgentModule.h:16
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Agents Created.
void preDraw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Pre draw.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Draw.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Definition: FollowAgentModule.h:20