Module |
|
Header |
/Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMesh.h |
Include |
#include "Detour/DetourNavMesh.h" |
class dtNavMesh
A navigation mesh based on tiles of convex polygons.
The navigation mesh consists of one or more tiles defining three primary types of structural data:
A polygon mesh which defines most of the navigation graph. (See rcPolyMesh for its structure.) A detail mesh used for determining surface height on the polygon mesh. (See rcPolyMeshDetail for its structure.) Off-mesh connections, which define custom point-to-point edges within the navigation graph.
The general build process is as follows:
Create rcPolyMesh and rcPolyMeshDetail data using the Recast build pipeline.
Optionally, create off-mesh connection data.
Combine the source data into a dtNavMeshCreateParams structure.
Create a tile data array using dtCreateNavMeshData().
Allocate at dtNavMesh object and initialize it. (For single tile navigation meshes, the tile data is loaded during this step.)
For multi-tile navigation meshes, load the tile data using dtNavMesh::addTile().
Notes:
This class is usually used in conjunction with the dtNavMeshQuery class for pathfinding.
Technically, all navigation meshes are tiled. A 'solo' mesh is simply a navigation mesh initialized to have only a single tile.
This class does not implement any asynchronous methods. So the dtStatus result of all methods will always contain either a success or failure flag.
Name | Description | |
---|---|---|
|
dtNavMesh() |
Name | Description | |
---|---|---|
|
~dtNavMesh() |
Name | Description | ||
---|---|---|---|
|
addTile |
Adds a tile to the navigation mesh. |
|
|
applyAreaCostOrder ( |
||
|
applyWorldOffset ( |
Shift navigation mesh by provided offset. |
|
|
calcTileLoc ( |
Calculates the tile grid location for the specified world position. |
|
|
unsigned int |
decodeClusterIdCluster ( |
Extracts the cluster's index (within its tile) from the specified cluster reference. |
|
unsigned int |
decodeClusterIdTile ( |
Extracts the tile's index from the specified cluster reference. |
|
decodePolyId ( |
Decodes a standard polygon reference. This function is generally meant for internal use only. |
|
|
unsigned int |
decodePolyIdPoly ( |
Extracts the polygon's index (within its tile) from the specified polygon reference. |
|
unsigned int |
decodePolyIdSalt ( |
Extracts a tile's salt value from the specified polygon reference. |
|
unsigned int |
decodePolyIdTile ( |
Extracts the tile's index from the specified polygon reference. |
|
encodePolyId ( |
Derives a standard polygon reference. This function is generally meant for internal use only. |
|
|
const dtClus... |
getClusterLink ( |
|
|
dtClusterLin... |
getClusterLink ( |
Helper for accessing cluster links. |
|
getClusterRefBase ( |
Gets the cluster reference for the tile's base cluster. |
|
|
const dtLink... |
getLink ( |
|
|
dtLink & |
getLink ( |
Helper for accessing links. |
|
int |
getMaxTiles() |
The maximum number of tiles supported by the navigation mesh. |
|
getNeighbourCoords ( |
||
|
int |
getNeighbourTilesCountAt ( |
Returns neighbour tile count based on side of given tile. |
|
const dtOffM... |
getOffMeshConnectionByRef ( |
Gets the specified off-mesh connection: point type. |
|
getOffMeshConnectionPolyEndPoints |
Gets the endpoints for an off-mesh connection, ordered by "direction of travel". |
|
|
const dtOffM... |
getOffMeshSegmentConnectionByRef ( |
Gets the specified off-mesh connection: segment type |
|
const dtNavM... |
getParams() |
The navigation mesh initialization params. |
|
getPolyArea ( |
Gets the user defined area for the specified polygon. |
|
|
getPolyFlags ( |
Gets the user defined flags for the specified polygon. |
|
|
getPolyRefBase ( |
Gets the polygon reference for the tile's base polygon. |
|
|
unsigned int |
getSaltBits() |
|
|
const dtMesh... |
getTile ( |
Gets the tile at the specified index. |
|
getTileAndPolyByRef ( |
Gets the tile and polygon for the specified polygon reference. |
|
|
getTileAndPolyByRefUnsafe ( |
Returns the tile and polygon for the specified polygon reference. |
|
|
const dtMesh... |
getTileAt ( |
Gets the tile at the specified grid location. |
|
const dtMesh... |
getTileByRef ( |
Gets the tile for the specified tile reference. |
|
int |
getTileCountAt ( |
BEGIN Gets number of tiles at the specified grid location. (All layers.) |
|
unsigned int |
getTileIndex ( |
|
|
getTileRef ( |
Gets the tile reference for the specified tile. |
|
|
getTileRefAt ( |
Gets the tile reference for the tile at specified grid location. |
|
|
int |
getTilesAt ( |
Gets all tiles at the specified grid location. |
|
int |
getTileStateSize ( |
Gets the size of the buffer required by storeTileState to store the specified tile's state. |
|
init ( |
Initializes the navigation mesh for tiled use. |
|
|
init ( |
Initializes the navigation mesh for single tile use. |
|
|
isEmpty() |
||
|
isValidPolyRef ( |
Checks the validity of a polygon reference. |
|
|
linkOffMeshHelper ( |
Helper for creating links in off-mesh connections. |
|
|
removeTile ( |
Removes the specified tile from the navigation mesh. |
|
|
restoreTileState ( |
Restores the state of the tile. |
|
|
setPolyArea ( |
Sets the user defined area for the specified polygon. |
|
|
setPolyFlags ( |
Sets the user defined flags for the specified polygon. |
|
|
storeTileState ( |
Stores the non-structural state of the tile in the specified buffer. |
|
|
updateOffMeshConnectionByUserId ( |
Updates area and flags for specified off-mesh connection: point type |
|
|
updateOffMeshSegmentConnectionByUserId ( |
Updates area and flags for specified off-mesh connection: segment type |