Module |
|
Header |
/Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h |
Include |
#include "Detour/DetourNavMeshQuery.h" |
class dtQueryFilter
Defines polygon filtering and traversal costs for navigation mesh query operations.
The Default Implementation
At construction: All area costs default to 1.0. All flags are included and none are excluded.
If a polygon has both an include and an exclude flag, it will be excluded.
The way filtering works, a navigation mesh polygon must have at least one flag set to ever be considered by a query. So a polygon with no flags will never be considered.
Setting the include flags to 0 will result in all polygons being excluded.
Custom Implementations
dtQueryFilter.isVIrtual must be true in order to extend this class.
Implement a custom query filter by overriding the virtual passFilter() and getCost() functions. If this is done, both functions should be as fast as possible. Use cached local copies of data rather than accessing your own objects where possible.
Custom implementations do not need to adhere to the flags or cost logic used by the default implementation.
In order for A* searches to work properly, the cost should be proportional to the travel distance. Implementing a cost modifier less than 1.0 is likely to lead to problems during pathfinding.
Name | Description | |
---|---|---|
|
dtQueryFilter ( |
Name | Description | |
---|---|---|
|
~dtQueryFilter() |
Name | Description | ||
---|---|---|---|
|
copyFrom ( |
||
|
copyFrom ( |
Copy data values from source filter. |
|
|
equals ( |
Check if two filters have the same data values. |
|
|
equals ( |
||
|
const float ... |
getAllAreaCosts() |
|
|
const float ... |
getAllFixedAreaCosts() |
|
|
float |
getAreaCost ( |
Returns the traversal cost of the area. |
|
float |
getAreaFixedCost ( |
Returns the fixed cost for entering an area. |
|
float |
getCost ( |
Returns cost to move from the beginning to the end of a line segment that is fully contained within a polygon. |
|
unsigned sho... |
getExcludeFlags() |
Returns the exclude flags for the filter. |
|
float |
getHeuristicScale() |
Retrieves euclidean distance heuristic scale |
|
unsigned sho... |
getIncludeFlags() |
Returns the include flags for the filter. |
|
float |
getInlineCost ( |
Inlined scoring function. |
|
getIsBacktracking() |
Retrieves information whether this filter is set up for backtracking |
|
|
float |
getModifiedHeuristicScale() |
|
|
getShouldIgnoreClosedNodes() |
Retrieves information whether this filter allows reopening closed nodes |
|
|
float |
getVirtualCost ( |
Virtual scoring function implementation (defaults to getInlineCost). |
|
isValidLinkSide ( |
Filters link in regards to its side. Used for backtracking. |
|
|
passFilter ( |
Returns true if the polygon can be visited. (I.e. Is traversable.) |
|
|
passInlineFilter ( |
Inlined filter implementation. |
|
|
passVirtualFilter ( |
Virtual filter implementation (defaults to passInlineFilter). |
|
|
setAreaCost ( |
Sets the traversal cost of the area. |
|
|
setAreaFixedCost ( |
Sets the fixed cost for entering an area. |
|
|
setExcludeFlags ( |
Sets the exclude flags for the filter. |
|
|
setHeuristicScale ( |
Set euclidean distance heuristic scale. |
|
|
setIncludeFlags ( |
Sets the include flags for the filter. |
|
|
setIsBacktracking ( |
Sets up filter for backtracking. |
|
|
setShouldIgnoreClosedNodes ( |
Instruct filter whether it can reopen nodes already on closed list. |