9 #ifndef Navigation_BaseBestGraphVertexPathFinderQuery_H
10 #define Navigation_BaseBestGraphVertexPathFinderQuery_H
54 static QueryType GetStaticType() {
return TypeBestGraphVertexPathFinderQuery; }
55 virtual QueryType GetType()
const {
return TypeBestGraphVertexPathFinderQuery; }
56 virtual void BuildQueryBlob(BaseBlobHandler* blobHandler);
57 virtual void InitFromQueryBlob(
World* world,
void* blob);
58 virtual Ptr<BaseBlobHandler> CreateQueryBlobHandler() {
return CreateStaticQueryBlobHandler(); }
59 static Ptr<BaseBlobHandler> CreateStaticQueryBlobHandler();
70 KyFloat32 GetFromOutsideNavMeshDistance()
const;
71 KyFloat32 GetToOutsideNavMeshDistance()
const;
72 const Vec3f& GetStartPos()
const;
77 Path* GetPath()
const;
79 KyUInt32 GetNumberOfProcessedNodePerFrame()
const;
81 const PositionSpatializationRange& GetPositionSpatializationRange()
const;
83 void ComputePathRefinerConfigInternals();
84 const PathRefinerConfig& GetPathRefinerConfig()
const;
86 void SetPathClamperFlagMask(PathClamperFlagMask pathClamperFlagMask);
90 void BindToDatabase(
Database* database);
93 void SetStartNavGraphEdgePtr(
const NavGraphEdgePtr& startNavGraphEdgePtr, NavGraphEdgeDirection navGraphEdgePathfindMode);
102 void SetPropagationRadius(
KyFloat32 propagationRadius);
103 void SetPositionSpatializationRange(
const PositionSpatializationRange& positionSpatializationRange);
104 void SetFromOutsideNavMeshDistance(
KyFloat32 fromOutsideNavMeshDistance);
105 void SetToOutsideNavMeshDistance(
KyFloat32 toOutsideNavMeshDistance);
106 void SetNumberOfProcessedNodePerFrame(
KyUInt32 numberOfProcessedNodePerFrame);
126 PathRefinerConfig m_pathRefinerConfig;
127 PathClamperFlagMask m_pathClamperFlagMask;
130 AStarNodeIndex m_currentVertexNodeIdx;
133 AStarNodeIndex m_bestVertexNodeIdx;
134 Ptr<Path> m_rememberBestPathSoFar;
142 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetStartTrianglePtr(
const NavTrianglePtr& startTrianglePtr) {
m_startTrianglePtr = startTrianglePtr; }
143 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetPropagationRadius(
KyFloat32 propagationRadius) { m_propagationRadius = propagationRadius; }
145 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetChannelComputerConfig(
const ChannelComputerConfig& config) {
m_channelComputerConfig = config; }
149 KY_INLINE Path* BaseBestGraphVertexPathFinderQuery::GetPath()
const {
return m_path; }
151 KY_INLINE
KyFloat32 BaseBestGraphVertexPathFinderQuery::GetPropagationRadius()
const {
return m_propagationRadius; }
153 KY_INLINE
KyFloat32 BaseBestGraphVertexPathFinderQuery::GetFromOutsideNavMeshDistance()
const {
return m_traversalParams.GetFromOutsideNavMeshDistance(); }
154 KY_INLINE
KyFloat32 BaseBestGraphVertexPathFinderQuery::GetToOutsideNavMeshDistance()
const {
return m_traversalParams.GetToOutsideNavMeshDistance(); }
155 KY_INLINE
KyUInt32 BaseBestGraphVertexPathFinderQuery::GetNumberOfProcessedNodePerFrame()
const {
return m_traversalParams.GetNumberOfProcessedNodePerFrame(); }
156 KY_INLINE
const Vec3f& BaseBestGraphVertexPathFinderQuery::GetStartPos()
const {
return IPathFinderQuery::GetStartPos(); }
158 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetFromOutsideNavMeshDistance(
KyFloat32 fromOutsideNavMeshDistance)
160 m_traversalParams.SetFromOutsideNavMeshDistance(fromOutsideNavMeshDistance);
162 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetToOutsideNavMeshDistance(
KyFloat32 toOutsideNavMeshDistance)
164 m_traversalParams.SetToOutsideNavMeshDistance(toOutsideNavMeshDistance);
166 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetNumberOfProcessedNodePerFrame(
KyUInt32 numberOfProcessedNodePerFrame)
168 m_traversalParams.SetNumberOfProcessedNodePerFrame(numberOfProcessedNodePerFrame);
170 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetPositionSpatializationRange(
const PositionSpatializationRange& positionSpatializationRange)
172 m_traversalParams.SetPositionSpatializationRange(positionSpatializationRange);
174 KY_INLINE
const PositionSpatializationRange& BaseBestGraphVertexPathFinderQuery::GetPositionSpatializationRange()
const {
return m_traversalParams.GetPositionSpatializationRange(); }
176 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::ComputePathRefinerConfigInternals() { m_pathRefinerConfig.ComputeInternals();}
177 KY_INLINE
const PathRefinerConfig& BaseBestGraphVertexPathFinderQuery::GetPathRefinerConfig()
const {
return m_pathRefinerConfig;}
178 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetPathClamperFlagMask(PathClamperFlagMask pathClamperFlagMask) { m_pathClamperFlagMask = pathClamperFlagMask; }
180 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetStartNavGraphEdgePtr(
const NavGraphEdgePtr& startNavGraphEdgePtr, NavGraphEdgeDirection navGraphEdgePathfindMode)
184 KY_LOG_WARNING_IF(
m_startTrianglePtr.
IsValid(), (
"You are setting a start NavGraphEdgePtr whereas a start NavTrianglePtr was set too."));
190 KY_INLINE
void BaseBestGraphVertexPathFinderQuery::SetStartNavGraphVertexPtr(
const NavGraphVertexPtr& startNavGraphVertexPtr)
193 KY_LOG_WARNING_IF(
m_startTrianglePtr.
IsValid(), (
"You are setting a start NavGraphVertexPtr whereas a start NavTrianglePtr was set too."));
194 KY_LOG_WARNING_IF(
m_startNavGraphEdgePtr.
IsValid(), (
"You are setting a start NavGraphVertexPtr whereas a start NavGraphEdgePtr was set too."));
200 #endif // Navigation_BaseBestGraphVertexPathFinderQuery_H
ChannelComputerConfig m_channelComputerConfig
The parameter set specific to Channels computation.
Definition: ipathfinderquery.h:103
bool IsValid() const
Returns true if this object refers to a valid triangle: i.e. a triangle in a validNavFloor. see NavFloorPtr::IsValid().
Definition: navtriangleptr.h:132
NavGraphEdgeDirection m_navGraphEdgePathfindMode
Whether we should pathfind on that edge both ways or not.
Definition: basebestgraphvertexpathfinderquery.h:127
void Invalidate()
Invalidates this object.
Definition: navtriangleptr.h:134
Base class for all pathfinder queries.
Definition: ipathfinderquery.h:38
bool IsValid() const
Returns true if this object refers to a valid NavGraphVertex: i.e. a NavGraphVertex in a validNavGrap...
Definition: navgraphvertexptr.h:113
PathFinderQueryComputeChannelMode
This enum tells if the PathFinderQuery should compute Channels around path sections laying on the Nav...
Definition: ipathfinderquery.h:28
NavGraphEdgePtr m_startNavGraphEdgePtr
When this NavGraph edge is valid, that means that you want the path to start with that edge...
Definition: basebestgraphvertexpathfinderquery.h:124
Base class for BestGraphVertexPathFinderQuery.
Definition: basebestgraphvertexpathfinderquery.h:51
Indicates that the input channelComputerConfig is invalid.
Definition: basebestgraphvertexpathfinderquery.h:43
void Invalidate()
Invalidates this object.
Definition: navgraphvertexptr.h:114
Indicates the query has not yet been initialized.
Definition: basebestgraphvertexpathfinderquery.h:24
Class that aggregates parameters that allow to configure the channel computation of a Bot...
Definition: channelcomputerconfig.h:76
#define KY_NULL
Null value.
Definition: types.h:247
Indicates the query has not yet been launched.
Definition: basebestgraphvertexpathfinderquery.h:25
void Invalidate()
Invalidates this object.
Definition: navgraphedgeptr.h:130
Indicates that the astar traversal algorithm has been launched, but has not yet completed.
Definition: basebestgraphvertexpathfinderquery.h:27
This class aggregates Channels along a Path.
Definition: channelarray.h:31
Indicates that insufficient working memory caused the query to stop.
Definition: basebestgraphvertexpathfinderquery.h:41
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:54
Ptr< Path > m_path
The Path found by the query.
Definition: ipathfinderquery.h:98
virtual const Vec3f * GetDestination() const
This function is virtual because not all the PathFinders have a preset destination, it may return KY_NULL.
Definition: basebestgraphvertexpathfinderquery.h:159
Indicates that the computation has been canceled.
Definition: basebestgraphvertexpathfinderquery.h:45
An internal class that stores parameters used to control the propagation of traversals through the Na...
Definition: traversalparams.h:23
PathFinderQueryComputeChannelMode m_computeChannelMode
The mode toggling Channels computation.
Definition: ipathfinderquery.h:102
virtual void GetPathFinderTextResult(String &) const
Fills the String with an explanation of the result. Use this to debug your pathfinder query...
Indicates that the refiner is done, the channel is going to be initialized.
Definition: basebestgraphvertexpathfinderquery.h:34
QueryType
Enumerates all the type of query.
Definition: iquery.h:29
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Indicates that the refining process is being initialized.
Definition: basebestgraphvertexpathfinderquery.h:29
Indicates that the refined path is being clamped to navMesh according to the altitude tolerance...
Definition: basebestgraphvertexpathfinderquery.h:32
NavTrianglePtr m_startTrianglePtr
The NavMesh triangle that corresponds to m_startPos3f.
Definition: basebestgraphvertexpathfinderquery.h:121
NavGraphVertexPtr m_startNavGraphVertexPtr
When this NavGraph vertex is valid, that means that you want the path to start at that vertice...
Definition: basebestgraphvertexpathfinderquery.h:130
BestGraphVertexPathFinderQueryResult m_result
Updated during processing to indicate the result of the PathFinderQueryResult query.
Definition: basebestgraphvertexpathfinderquery.h:147
Definition: gamekitcrowddispersion.h:20
Indicates that the clamping algorithm has completed, but the path has not yet been built...
Definition: basebestgraphvertexpathfinderquery.h:33
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexptr.h:22
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
Indicates that the NavTag at the starting point is forbidden.
Definition: basebestgraphvertexpathfinderquery.h:38
PathFinderResult
Enumerates the possible status of a IPathFinderQuery.
Definition: ipathfinderquery.h:43
Indicates that a path has been found between the start and destination.
Definition: basebestgraphvertexpathfinderquery.h:47
ScopedDisplayList is used to push text, lines or shapes for rendering in the NavigationLab e...
Definition: displaylist.h:136
Indicates that a path could not be found between the start and destination points.
Definition: basebestgraphvertexpathfinderquery.h:39
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
Indicates that the channel is initialized, the channel is being computed.
Definition: basebestgraphvertexpathfinderquery.h:35
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates that a computation error caused the query to stop.
Definition: basebestgraphvertexpathfinderquery.h:44
bool IsValid() const
Returns true if this object refers to a valid NavGraphEdge: i.e. a NavGraphEdge in a valid NavGraph...
Definition: navgraphedgeptr.h:129
Indicates that the astar traversal algorithm is finished, and that the path found is ready to be refi...
Definition: basebestgraphvertexpathfinderquery.h:28
Indicates that the query has not yet been launched.
Definition: iquery.h:347
Vec3f m_startInsidePos3f
if m_startPos3f is slightly outside and we hook on the NavMesh, it is the computed inside pos...
Definition: basebestgraphvertexpathfinderquery.h:132
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
Indicates that the path found is being refined.
Definition: basebestgraphvertexpathfinderquery.h:30
Indicates that the query has stopped and must be relaunched because of a change in the NavData...
Definition: basebestgraphvertexpathfinderquery.h:40
Each instance of this class uniquely identifies a single NavGraphVertex in a NavGraph.
Definition: navgraphvertexrawptr.h:36
Indicates that a NavMesh triangle could not be found for the starting point.
Definition: basebestgraphvertexpathfinderquery.h:37
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
virtual void DisplayPropagationBounds(ScopedDisplayList &displayList) const
Fill the displayList with display info that may help to understand a PathFinderFailure (mainly propag...
Indicates that the refiner is done, but the path has not yet been clamped to the navMesh.
Definition: basebestgraphvertexpathfinderquery.h:31
Indicates that a computation error caused the query to stop.
Definition: basebestgraphvertexpathfinderquery.h:42