gwnavruntime/queries/diskcangoquery.h Source File

diskcangoquery.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 
17 
18 namespace Kaim
19 {
20 
21 class NavTriangleRawPtr;
22 
26 template<class TraverseLogic>
28 {
29 public:
30  virtual void Advance(WorkingMemory* workingMemory)
31  {
32  PerformQuery(workingMemory);
33  m_processStatus = QueryDone;
34  }
35 
37  void PerformQuery(WorkingMemory* workingMemory = nullptr);
38 
40  void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
41 
42 private:
43  void ForceDiskCanGo(WorkingMemory* workingMemory, const CellBox& cellBox, const NavTriangleRawPtr& startTriangleRawPtr);
44 
45  KyResult RayCastQueryFromStartOnTheRigth(WorkingMemory* workingMemory, const Vec2f& normalizedDir2d, RayCastQuery<TraverseLogic>& rayCastQuery,
46  RayCastQueryResult& queryOnRightResult, KyFloat32& borderDistOnRight);
47 
48  KyResult RayCastQueryFromStartOnTheLeft(WorkingMemory* workingMemory, const Vec2f& normalizedDir2d, RayCastQuery<TraverseLogic>& rayCastQuery,
49  RayCastQueryResult& queryOnLeftResult, KyFloat32& borderDistOnLeft);
50 };
51 
52 }
53 
55 
56 
57 
58 
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: diskcangoquery.h:30
Base class for DiskCanGoQuery.
Definition: basediskcangoquery.h:55
QueryProcessStatus m_processStatus
Modified by the query within Advance(). Do not modify.
Definition: iquery.h:231
void PerformQuery(WorkingMemory *workingMemory=nullptr)
If workingMemory param is nullptr, m_database.GetWorkingMemory() will be used.
Definition: diskcangoquery.inl:11
RayCastQueryResult
Enumerates the possible results of a RayCastQuery.
Definition: baseraycastquery.h:24
2d vector using KyFloat32.
Definition: vec2f.h:18
Navigation return code class.
Definition: types.h:108
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Identifies a single NavTriangle in a NavFloor.
Definition: navtrianglerawptr.h:21
The RayCastQuery class tests whether a ray (with a width of 0) can be cast from a starting point (m_s...
Definition: raycastquery.h:31
void PerformQueryWithInputCoordPos(WorkingMemory *workingMemory)
Performs the query after SetStartIntegerPos() and SetDestIntegerPos() were called.
Definition: diskcangoquery.inl:33
The DiskCanGoQuery tests whether a disk with a specified radius can go from start to dest...
Definition: diskcangoquery.h:27
float KyFloat32
float
Definition: types.h:32