Navigation
API > API/Runtime > API/Runtime/Navmesh
Provides the ability to perform pathfinding related queries against a navigation mesh.
For methods that support undersized buffers, if the buffer is too small to hold the entire result set the return status of the method will include the DT_BUFFER_TOO_SMALL flag.
Constant member functions can be used by multiple clients without side effects. (E.g. No change to the closed list. No impact on an in-progress sliced path query. Etc.)
Walls and portals: A wall is a polygon segment that is considered impassable. A portal is a passable segment between polygons. A portal may be treated as a wall based on the dtQueryFilter used for a query.
| Name | dtNavMeshQuery |
| Type | class |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h |
| Include Path | #include "Detour/DetourNavMeshQuery.h" |
Syntax
class dtNavMeshQuery
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
dtNavMeshQuery() |
Detour/DetourNavMeshQuery.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~dtNavMeshQuery() |
Detour/DetourNavMeshQuery.h |
Structs
| Name | Remarks |
|---|---|
| dtQueryData |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| m_linkFilter | dtQuerySpecialLinkFilter * | Pointer to optional special link filter. | Detour/DetourNavMeshQuery.h | |
| m_nav | const dtNavMesh * | Pointer to navmesh data. | Detour/DetourNavMeshQuery.h | |
| m_nodePool | dtNodePool * | Pointer to node pool. | Detour/DetourNavMeshQuery.h | |
| m_openList | dtNodeQueue * | Pointer to open list queue. | Detour/DetourNavMeshQuery.h | |
| m_query | dtQueryData | Sliced query state. | Detour/DetourNavMeshQuery.h | |
| m_queryNodes | int | Detour/DetourNavMeshQuery.h | ||
| m_tinyNodePool | dtNodePool * | Pointer to small node pool. | Detour/DetourNavMeshQuery.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
dtStatus appendPortals
(
const int startIdx, |
Appends intermediate portal points to a straight path. | Detour/DetourNavMeshQuery.h | |
dtStatus appendVertex
(
const dtReal* pos, |
Appends vertex to a straight path. | Detour/DetourNavMeshQuery.h | |
dtStatus closestPointOnPoly
(
dtPolyRef ref, |
Finds the closest point on the specified polygon. | Detour/DetourNavMeshQuery.h | |
dtStatus closestPointOnPolyBoundary
(
dtPolyRef ref, |
Returns a point on the boundary closest to the source point if the source point is outside the polygon's xz-bounds. | Detour/DetourNavMeshQuery.h | |
dtStatus finalizeSlicedFindPath
(
dtPolyRef* path, |
Finalizes and returns the results of a sliced path query. | Detour/DetourNavMeshQuery.h | |
dtStatus finalizeSlicedFindPathPartial
(
const dtPolyRef* existing, |
Finalizes and returns the results of an incomplete sliced path query, returning the path to the furthest polygon on the existing path that was visited during the search. | Detour/DetourNavMeshQuery.h | |
dtStatus findDistanceToWall
(
dtPolyRef startRef, |
Finds the distance from the specified position to the nearest polygon wall. | Detour/DetourNavMeshQuery.h | |
dtStatus findLocalNeighbourhood
(
dtPolyRef startRef, |
Finds the non-overlapping navigation polygons in the local neighbourhood around the center position. | Detour/DetourNavMeshQuery.h | |
dtStatus findNearestContainingPoly
(
const dtReal* center, |
Finds the nearest polygon in height containing the specified center point. | Detour/DetourNavMeshQuery.h | |
dtStatus findNearestPoly
(
const dtReal* center, |
Finds the polygon nearest to the specified center point. | Detour/DetourNavMeshQuery.h | |
dtStatus findNearestPoly2D
(
const dtReal* center, |
Finds the polygon 2D-nearest to the specified center point. | Detour/DetourNavMeshQuery.h | |
dtStatus findPath
(
dtPolyRef startRef, |
Finds a path from the start polygon to the end polygon. | Detour/DetourNavMeshQuery.h | |
dtStatus findPolysAroundCircle
(
dtPolyRef startRef, |
Finds the polygons along the navigation graph that touch the specified circle. | Detour/DetourNavMeshQuery.h | |
dtStatus findPolysAroundShape
(
dtPolyRef startRef, |
Finds the polygons along the naviation graph that touch the specified convex polygon. | Detour/DetourNavMeshQuery.h | |
dtStatus findPolysInPathDistance
(
dtPolyRef startRef, |
Finds the polygons along the navigation graph that are no more than given path length away from centerPos. | Detour/DetourNavMeshQuery.h | |
dtStatus findRandomPoint
(
const dtQueryFilter* filter, |
Returns random location on navmesh. | Detour/DetourNavMeshQuery.h | |
dtStatus findRandomPointAroundCircle
(
dtPolyRef startRef, |
Returns random location on navmesh within the reach of specified location. | Detour/DetourNavMeshQuery.h | |
dtStatus findRandomPointInPoly
(
dtPolyRef ref, |
Returns random location inside the specified polygon. | Detour/DetourNavMeshQuery.h | |
dtStatus findStraightPath
(
const dtReal* startPos, |
Finds the straight path from the start to the end position within the polygon corridor. | Detour/DetourNavMeshQuery.h | |
dtStatus findWallsAroundPath
(
const dtPolyRef* path, |
[UE] Finds the wall segments that overlap the polygon shape. | Detour/DetourNavMeshQuery.h | |
dtStatus findWallsInNeighbourhood
(
dtPolyRef startRef, |
[UE] Finds the wall segments in local neighbourhood | Detour/DetourNavMeshQuery.h | |
dtStatus findWallsOverlappingShape
(
dtPolyRef startRef, |
[UE] Finds the wall segments that overlap the polygon shape. | Detour/DetourNavMeshQuery.h | |
const dtNavMesh * getAttachedNavMesh() |
Gets the navigation mesh the query object is using. | Detour/DetourNavMeshQuery.h | |
void getCurrentBestResult
(
dtNode*& bestNode, |
Gets best node ref and cost from sliced pathfinding data. | Detour/DetourNavMeshQuery.h | |
dtStatus getEdgeMidPoint
(
dtPolyRef from, |
Detour/DetourNavMeshQuery.h | ||
dtStatus getEdgeMidPoint
(
dtPolyRef from, |
Returns edge mid point between two polygons. | Detour/DetourNavMeshQuery.h | |
dtNodePool * getNodePool() |
Gets the node pool. | Detour/DetourNavMeshQuery.h | |
dtStatus getPolyHeight
(
dtPolyRef ref, |
Gets the height of the polygon at the provided position using the height detail. | Detour/DetourNavMeshQuery.h | |
dtStatus getPolyWallSegments
(
dtPolyRef ref, |
Returns the segments for the specified polygon, optionally including portals. | Detour/DetourNavMeshQuery.h | |
dtStatus getPortalPoints
(
dtPolyRef from, |
Exposing function to be able to generate navigation corridors as sequence of point pairs | Detour/DetourNavMeshQuery.h | |
dtStatus getPortalPoints
(
dtPolyRef from, |
Detour/DetourNavMeshQuery.h | ||
int getQueryNodes() |
Detour/DetourNavMeshQuery.h | ||
dtStatus init
(
const dtNavMesh* nav, |
Initializes the query object. | Detour/DetourNavMeshQuery.h | |
dtStatus initSlicedFindPath
(
dtPolyRef startRef, |
Initializes a sliced path query. | Detour/DetourNavMeshQuery.h | |
bool isInClosedList
(
dtPolyRef ref |
Returns true if the polygon reference is in the closed list. | Detour/DetourNavMeshQuery.h | |
dtStatus isPointInsidePoly
(
dtPolyRef ref, |
Checks if specified pos is inside given polygon specified by ref | Detour/DetourNavMeshQuery.h | |
bool isRequiringNavigableEndLocation() |
Detour/DetourNavMeshQuery.h | ||
bool isValidPolyRef
(
dtPolyRef ref, |
Returns true if the polygon reference is valid and passes the filter restrictions. | Detour/DetourNavMeshQuery.h | |
dtStatus moveAlongSurface
(
dtPolyRef startRef, |
Moves from the start to the end position constrained to the navigation mesh. | Detour/DetourNavMeshQuery.h | |
bool passLinkFilter
(
const dtMeshTile* tile, |
Detour/DetourNavMeshQuery.h | ||
bool passLinkFilterByRef
(
const dtMeshTile* tile, |
Detour/DetourNavMeshQuery.h | ||
dtStatus projectedPointOnPoly
(
dtPolyRef ref, |
Finds the point's projection on the specified polygon. | Detour/DetourNavMeshQuery.h | |
dtStatus queryPolygons
(
const dtReal* center, |
Finds polygons that overlap the search box. | Detour/DetourNavMeshQuery.h | |
dtStatus raycast
(
dtPolyRef startRef, |
Casts a 'walkability' ray along the surface of the navigation mesh from the start position toward the end position. | Detour/DetourNavMeshQuery.h | |
void setRequireNavigableEndLocation
(
const bool value |
Detour/DetourNavMeshQuery.h | ||
void updateLinkFilter
(
dtQuerySpecialLinkFilter* linkFilter |
UE: updates special link filter for this query. | Detour/DetourNavMeshQuery.h | |
dtStatus updateSlicedFindPath
(
const int maxIter, |
Updates an in-progress sliced path query. | Detour/DetourNavMeshQuery.h | |
bool wasClusterLinkSearched
(
dtPolyRef cFrom, |
Returns true if the cluster link was used in previous search. | Detour/DetourNavMeshQuery.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void dtApplyEpsilon
(
dtReal* extents |
Handle 0 extents by having the vector components set to a minimum value. | Detour/DetourNavMeshQuery.h |
See Also
-
dtAllocNavMeshQuery()
-
dtAllocNavMeshQuery()