9 #ifndef Navigation_BestGraphVertexPathFinderQuery_H
10 #define Navigation_BestGraphVertexPathFinderQuery_H
21 class PathFinderQueryUtils;
23 enum OnGraphVertexVisitedResult
25 OnGraphVertexVisited_IgnoreVertex_GoOn,
26 OnGraphVertexVisited_IgnoreVertex_StopWithBestSoFar,
27 OnGraphVertexVisited_StopOnThisVertex,
28 OnGraphVertexVisited_VertexIsTheBestSoFar_GoOn,
29 OnGraphVertexVisited_NeedToCheckRefinePathToThisVertex
32 enum OnPathToGraphVertexComputedResult
34 OnPathToGraphVertexComputed_IgnoreVertex_GoOn,
35 OnPathToGraphVertexComputed_IgnoreVertex_StopWithBestSoFar,
36 OnPathToGraphVertexComputed_StopOnThisVertex,
37 OnPathToGraphVertexComputed_VertexIsTheBestSoFar_GoOn,
58 template<
class VertexFinderLogic>
59 class BestGraphVertexPathFinderQuery :
public BaseBestGraphVertexPathFinderQuery
129 virtual void Advance(WorkingMemory* workingMemory);
136 KyFloat32 GetFromOutsideNavMeshDistance()
const;
138 const Vec3f& GetStartPos()
const;
142 Path* GetPath()
const;
143 KyUInt32 GetNumberOfProcessedNodePerFrame()
const;
145 const PositionSpatializationRange& GetPositionSpatializationRange()
const;
147 void ComputePathRefinerConfigInternals();
148 const PathRefinerConfig& GetPathRefinerConfig()
const;
152 bool HasNavDataChanged();
155 void SetFinish(WorkingMemory* workingMemory);
162 KyResult CheckNavDataChange(WorkingMemory* workingMemory);
168 class TraversalCustomizer
171 typedef VertexFinderLogic TLogic;
178 bool CanEnterNavTag(
const NavTag& exitNavTag,
const NavTag& enterNavTag,
const Vec3f& pos);
179 KyFloat32 GetHeuristicFromNodePosition(
const Vec3f& nodePosition);
182 bool ShouldVisitNode(AStarTraversalContext* astarContext, AStarNodeIndex nodeIndex);
183 bool IsNodeOutsidePropagationBounds(AStarTraversalContext* astarContext, AStarNodeIndex nodeIndex);
186 bool ShouldOpenAbstractGraphNode(
const AbstractGraphNodeRawPtr& abstractGraphNodeRawPtr);
187 bool ShouldOpenNavTriangleUnderAbstractGraphNode(
const AbstractGraphNodeRawPtr& abstractGraphNodeRawPtr);
188 Vec3f ComputeNodePositionOnHalfEdge(AStarTraversalContext* aStarTraversalContext,
const Vec3f& startPosOfEdge,
189 const Vec3f& endPosOfEdge, AStarNodeIndex predecessorNodeIndex);
190 KyResult OnNavTriangleExplored(AStarTraversalContext* aStarTraversalContext,
const NavTriangleRawPtr& navTriangleRawPtr, AStarNodeIndex currentNodeIndex);
191 KyResult OnNavGraphEdgeExplored(AStarTraversalContext* aStarTraversalContext,
const NavGraphEdgeRawPtr& navGraphEdgeRawPtr, AStarNodeIndex currentNodeIndex);
200 AStarTraversal<TraversalCustomizer> m_traversal;
207 #endif //Navigation_BestGraphVertexPathFinderQuery_H
This query propagates outward through the NavMesh from the starting position.
Definition: bestgraphvertexpathfinderquery.h:62
PathFinderQueryComputeChannelMode
This enum tells if the PathFinderQuery should compute Channels around path sections laying on the Nav...
Definition: ipathfinderquery.h:28
virtual void Advance(WorkingMemory *workingMemory)
Performs a single iteration of the PathFinder.
Definition: bestgraphvertexpathfinderquery.inl:174
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
Definition: bestgraphvertexpathfinderquery.inl:33
void SetStartTrianglePtr(const NavTrianglePtr &startTrianglePtr)
The NavMesh triangle that corresponds to m_startPos3f.
Definition: bestgraphvertexpathfinderquery.inl:45
void SetPropagationRadius(KyFloat32 propagationRadius)
Write accessor for m_propagationRadius.
Definition: bestgraphvertexpathfinderquery.inl:70
void SetNumberOfProcessedNodePerFrame(KyUInt32 numberOfProcessedNodePerFrame)
Write accessor for TraversalParams::m_numberOfVisitedNodePerFrame.
Definition: bestgraphvertexpathfinderquery.inl:88
Class that aggregates parameters that allow to configure the channel computation of a Bot...
Definition: channelcomputerconfig.h:76
This class is an helper used internaly by the PathFinder Queries to factorize Code.
Definition: pathfinderqueryutils.h:37
#define KY_NULL
Null value.
Definition: types.h:247
Each instance of this class uniquely identifies a single NavGraphEdge in a NavGraph.
Definition: navgraphedgerawptr.h:33
void SetPositionSpatializationRange(const PositionSpatializationRange &positionSpatializationRange)
Write accessor for TraversalParams::m_positionSpatializationRange.
Definition: bestgraphvertexpathfinderquery.inl:60
void SetComputeChannelMode(PathFinderQueryComputeChannelMode computeChannelMode)
Write accessor for m_computeChannelMode.
Definition: bestgraphvertexpathfinderquery.inl:76
void SetChannelComputerConfig(const ChannelComputerConfig &channelComputerConfig)
Write accessor for m_channelComputerConfig.
Definition: bestgraphvertexpathfinderquery.inl:82
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Definition: gamekitcrowddispersion.h:20
void SetStartNavGraphEdgePtr(const NavGraphEdgePtr &startNavGraphEdgePtr, NavGraphEdgeDirection navGraphEdgePathfindMode)
Optional NavGraph edge you want the start position must be considered to lie on.
Definition: bestgraphvertexpathfinderquery.inl:50
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexptr.h:22
void SetFromOutsideNavMeshDistance(KyFloat32 fromOutsideNavMeshDistance)
Write accessor for TraversalParams::m_fromOutsideNavMeshDistance.
Definition: bestgraphvertexpathfinderquery.inl:65
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtrianglerawptr.h:30
void SetStartNavGraphVertexPtr(const NavGraphVertexPtr &startNavGraphVertexPtr)
Optional NavGraph Vertex you want the start position must be considered to be on. ...
Definition: bestgraphvertexpathfinderquery.inl:55
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
virtual void ReleaseWorkingMemoryOnCancelDuringProcess(WorkingMemory *workingMemory=0)
Called when a query is canceled in FlushCommands while its status is QueryInProcess to make sure that...
Definition: bestgraphvertexpathfinderquery.inl:163
void * m_traverseLogicUserData
This userData is typically passed by the Bot.
Definition: iquery.h:278
Each instance of this class uniquely identifies a single and mono-directionnal NavGraphEdge in a NavG...
Definition: navgraphedgeptr.h:25
void Initialize()
Should be called by the derived class before trying to perform the query or to push it in a QueryQueu...
Definition: iquery.h:404
BestGraphVertexPathFinderQueryResult
Enumerates the possible results of an BestGraphVertexPathFinderQuery.
Definition: basebestgraphvertexpathfinderquery.h:22
Each instance of this class uniquely identifies a singleNavHalfEdge in a NavFloor.
Definition: navhalfedgerawptr.h:34
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexrawptr.h:36
The class representing a path.
Definition: path.h:42
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23