Atoms Crowd  7.0.0
NavigationModule.h
1 #pragma once
2 #ifndef ATOMS_UNREAL
3 #include <Atoms/BehaviourModule.h>
4 #include <Atoms/Agent.h>
5 #include <AtomsUtils/NavigationMesh/Detour/DetourNavMesh.h>
6 #include <AtomsUtils/NavigationMesh/Detour/DetourNavMeshQuery.h>
7 #include <AtomsUtils/NavigationMesh/Detour/DetourCommon.h>
8 #include <AtomsUtils/NavigationMesh/Detour/DetourPathCorridor.h>
9 
10 
11 namespace AtomsModules
12 {
14  {
15  public:
16 
18  {
19  public:
20  virtual ~FAtomsAgentNavData() {}
23  AtomsUtils::dtPolyRef cornerPolys[5];
25  const AtomsUtils::dtQueryFilter* queryFilter;
26  float cornerVerts[5 * 3];
27  unsigned char cornerFlags[5];
28  int ncorners;
29  double topologyOptTime;
30  int sequenceTarget;
31  int sequenceTargetReached;
32  double metadataStartValue;
33  double targetReachTime;
34  AtomsMath::Vector3 startDirection;
35  double agentSize;
36  bool IgnoreSequenceTargetAfterReached;
37  bool metadataStartValueInit;
38  };
39 
41 
43 
44  void initSimulation(Atoms::AgentGroup* agentGroup);
45 
46  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
47 
48  void agentsKilled(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
49 
50  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
51 
52  void endFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
53 
54  void draw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
55 
56  static Atoms::BehaviourModule* creator(const std::string& parameter);
57 
58  bool moveAgentAlongPath(Atoms::Agent* agent, AtomsMath::Vector3* position, double pelvisHeight);
59 
60  private:
61 
62  //std::map<int, FAtomsAgentNavData> m_agentsNavData;
63 
64  bool m_activeDraw;
65  };
66 }
67 
68 
69 #endif
Agent group.
Definition: AgentGroup.h:36
Agent.
Definition: Agent.h:44
Definition: Agent.h:31
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: NavigationModule.h:14
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
void agentsKilled(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Post frame.
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Draw.
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Agents Created.
void initSimulation(Atoms::AgentGroup *agentGroup)
Init simulation.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
Definition: DetourNavMeshQuery.h:323
Definition: DetourPathCorridor.h:34
Definition: DetourNavMeshQuery.h:87
Type_uint64 dtPolyRef
Definition: DetourNavMesh.h:47