Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/dtNavMeshQuery
Description
Returns the segments for the specified polygon, optionally including portals.
If the `segmentRefs_ parameter is provided, then all polygon segments will be returned. Otherwise only the wall segments are returned.
A segment that is normally a portal will be included in the result set as a wall if the `filter_ results in the neighbor polygon becoomming impassable.
The segmentVerts_ and segmentRefs_ buffers should normally be sized for the maximum segments per polygon of the source navigation mesh.
| Name | getPolyWallSegments |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h |
| Include Path | #include "Detour/DetourNavMeshQuery.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMeshQuery.cpp |
dtStatus getPolyWallSegments
(
dtPolyRef ref,
const dtQueryFilter * filter,
dtReal * segmentVerts,
dtPolyRef * segmentRefs,
int * segmentCount,
const int maxSegments
) const
The status flags for the query.
Parameters
| Name | Remarks |
|---|---|
| ref | The reference id of the polygon. |
| filter | The polygon filter to apply to the query. |
| segmentVerts | The segments. [(ax, ay, az, bx, by, bz) * segmentCount] |
| segmentRefs | The reference ids of each segment's neighbor polygon. Or zero if the segment is a wall. [opt] [(parentRef) * segmentCount] |
| segmentCount | The number of segments returned. |
| maxSegments | The maximum number of segments the result arrays can hold. |