RavEngine
Loading...
Searching...
No Matches
Detour
Collaboration diagram for Detour:

Classes

struct  dtPoly
 
struct  dtMeshHeader
 
struct  dtMeshTile
 
struct  dtNavMeshParams
 
class  dtNavMesh
 
struct  dtNavMeshCreateParams
 
class  dtQueryFilter
 
struct  dtRaycastHit
 
class  dtPolyQuery
 
class  dtNavMeshQuery
 
class  dtPathCorridor
 

Typedefs

typedef unsigned int dtPolyRef
 
typedef unsigned int dtTileRef
 

Functions

dtNavMesh * dtAllocNavMesh ()
 
void dtFreeNavMesh (dtNavMesh *navmesh)
 
bool dtCreateNavMeshData (dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize)
 
dtNavMeshQuery * dtAllocNavMeshQuery ()
 
void dtFreeNavMeshQuery (dtNavMeshQuery *query)
 

Detailed Description

Members in this module are used to create, manipulate, and query navigation meshes.

Note
This is a summary list of members. Use the index or search feature to find minor members.

Members in this module are wrappers around the standard math library

Typedef Documentation

◆ dtPolyRef

A handle to a polygon within a navigation mesh tile.

Polygon references are subject to the same invalidate/preserve/restore rules that apply to dtTileRef's. If the dtTileRef for the polygon's tile changes, the polygon reference becomes invalid.

Changing a polygon's flags, area id, etc. does not impact its polygon reference.

◆ dtTileRef

A handle to a tile within a navigation mesh.

The following changes will invalidate a tile reference:

  • The referenced tile has been removed from the navigation mesh.
  • The navigation mesh has been initialized using a different set of dtNavMeshParams.

A tile reference is preserved/restored if the tile is added to a navigation mesh initialized with the original dtNavMeshParams and is added at the original reference location. (E.g. The lastRef parameter is used with dtNavMesh::addTile.)

Basically, if the storage structure of a tile changes, its associated tile reference changes.

Function Documentation

◆ dtAllocNavMesh()

dtNavMesh * dtAllocNavMesh ( )

Allocates a navigation mesh object using the Detour allocator.

Returns
A navigation mesh that is ready for initialization, or null on failure.

◆ dtAllocNavMeshQuery()

dtNavMeshQuery * dtAllocNavMeshQuery ( )

Allocates a query object using the Detour allocator.

Returns
An allocated query object, or null on failure.

◆ dtCreateNavMeshData()

bool dtCreateNavMeshData ( dtNavMeshCreateParams *  params,
unsigned char **  outData,
int *  outDataSize 
)

Builds navigation mesh tile data from the provided tile creation data.

Parameters
[in]paramsTile creation data.
[out]outDataThe resulting tile data.
[out]outDataSizeThe size of the tile data array.
Returns
True if the tile data was successfully created.

The output data array is allocated using the detour allocator (dtAlloc()). The method used to free the memory will be determined by how the tile is added to the navigation mesh.

See also
dtNavMesh, dtNavMesh::addTile()

◆ dtFreeNavMesh()

void dtFreeNavMesh ( dtNavMesh *  navmesh)

Frees the specified navigation mesh object using the Detour allocator.

Parameters
[in]navmeshA navigation mesh allocated using dtAllocNavMesh

This function will only free the memory for tiles with the DT_TILE_FREE_DATA flag set.

◆ dtFreeNavMeshQuery()

void dtFreeNavMeshQuery ( dtNavMeshQuery *  query)

Frees the specified query object using the Detour allocator.

Parameters
[in]queryA query object allocated using dtAllocNavMeshQuery