gwnavruntime/queries/moveonnavmeshquery.h Source File

moveonnavmeshquery.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
18 
19 namespace Kaim
20 {
21 
22 class NavHalfEdgeRawPtr;
23 
25 template<class TraverseLogic>
26 class MoveOnNavMeshQuery : public BaseMoveOnNavMeshQuery
27 {
28 public:
29  // ------------------------------ Functions -----------------------------
30 
31  static QueryType GetStaticType() { return TypeMoveOnNavMesh; }
32  virtual QueryType GetType() const { return TypeMoveOnNavMesh; }
33 
34  virtual ~MoveOnNavMeshQuery() {}
35 
36  virtual void Advance(WorkingMemory* workingMemory)
37  {
38  PerformQuery(workingMemory);
39  m_processStatus = QueryDone;
40  }
41 
43  void PerformQuery(WorkingMemory* workingMemory = nullptr);
44 
45 public: // internal
46  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
47 
48 private:
49  bool CollectNearbyNavMeshBorders(WorkingMemory* workingMemory, WorkingMemArray<NavHalfEdgeRawPtr>& nearbyEdges);
50  bool SolveCase(WorkingMemory* workingMemory, const WorkingMemArray<NavHalfEdgeRawPtr>& nearbyEdges);
51 };
52 
53 } // namespace Kaim
54 
56 
57 
58 
59 
QueryProcessStatus m_processStatus
Modified by the query within Advance(). Do not modify.
Definition: iquery.h:231
virtual QueryType GetType() const
Get query type.
Definition: moveonnavmeshquery.h:32
QueryType
Enumerates all the type of query.
Definition: iquery.h:25
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: moveonnavmeshquery.h:36
This class is used to get move bots on the NavMesh without physics engine.
Definition: moveonnavmeshquery.h:26
void PerformQuery(WorkingMemory *workingMemory=nullptr)
If workingMemory param is nullptr, m_database.GetWorkingMemory() will be used.
Definition: moveonnavmeshquery.inl:267