Atoms Crowd  7.0.0
FollowMeshModule.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 <AtomsUtils/KdTreePoint.h>
12 
13 
15 {
16  bool valid;
19 };
20 
21 
22 namespace AtomsModules
23 {
25  {
26  public:
27 
29 
31 
32  void initSimulation(Atoms::AgentGroup* agentGroup);
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 draw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
39 
40  static Atoms::BehaviourModule* creator(const std::string& parameter);
41 
42  void buildTree();
43 
44  private:
45 
47 
48  bool m_activeDraw;
49 
50  bool m_first;
51 
52  std::vector<FollowMeshDebugData> m_debugData;
53 
54  };
55 }
56 
57 
58 
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: FollowMeshModule.h:25
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
void initSimulation(Atoms::AgentGroup *agentGroup)
Init simulation.
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Draw.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
Definition: KdTreePoint.h:19
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Definition: FollowMeshModule.h:15