Atoms Crowd  7.0.0
Navigation3dModule.h
1 #pragma once
2 
3 #include <Atoms/BehaviourModule.h>
4 
5 
6 namespace AtomsModules
7 {
9  {
10  public:
11 
13 
15 
16  void initSimulation(Atoms::AgentGroup* agentGroup);
17 
18  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
19 
20  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
21 
22  void endFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
23 
24  void draw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
25 
26  static Atoms::BehaviourModule* creator(const std::string& parameter);
27 
28  AtomsCore::Vector3 pickTargetPoint(const int seed, const int groupId, const double radius, const AtomsCore::Vector3& center, const int hemisphereArea);
29 
30  AtomsCore::Vector3 pickOptimalTargetPoint(
31  const AtomsCore::Vector3& targetCenter,
32  const AtomsCore::Vector3& previousTargetPos,
33  const AtomsCore::Vector3& previousCenter,
34  const double targetRadius,
35  const double previousRadius,
36  const AtomsCore::Vector3& pos,
37  const int hemisphereArea);
38 
39  private:
40 
41  std::vector<std::vector<AtomsCore::Vector3>> m_paths;
42 
43  std::vector<AtomsCore::Matrix> m_targetMatricesSequence;
44 
45  AtomsCore::Vector3 m_centerOfMass;
46 
47  AtomsCore::Rand48 m_random;
48 
49  double m_agentGroupRadius;
50 
51  bool m_activeDraw;
52 
53  bool m_first;
54 
55  };
56 }
57 
58 
59 
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: Navigation3dModule.h:9
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Agents Created.
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Draw.
void initSimulation(Atoms::AgentGroup *agentGroup)
Init simulation.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57