engine
 
载入中...
搜索中...
未找到
类 | 类型定义 | 函数 | 变量
Detour

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

类

struct  dtMeshHeader
 Provides high level information related to a dtMeshTile object. 更多...
 
struct  dtMeshTile
 Defines a navigation mesh tile. 更多...
 
class  dtNavMesh
 A navigation mesh based on tiles of convex polygons. 更多...
 
struct  dtNavMeshCreateParams
 Represents the source data used to build an navigation mesh tile. 更多...
 
struct  dtNavMeshParams
 Configuration parameters used to define multi-tile navigation meshes. 更多...
 
class  dtNavMeshQuery
 Provides the ability to perform pathfinding related queries against a navigation mesh. 更多...
 
class  dtPathCorridor
 Represents a dynamic polygon corridor used to plan agent movement. 更多...
 
struct  dtPoly
 Defines a polyogn within a dtMeshTile object. 更多...
 
class  dtQueryFilter
 Defines polygon filtering and traversal costs for navigation mesh query operations. 更多...
 

类型定义

typedef unsigned int dtPolyRef
 A handle to a polygon within a navigation mesh tile. 更多...
 
typedef unsigned int dtTileRef
 A handle to a tile within a navigation mesh. 更多...
 

函数

NAVMESH_API dtNavMesh * dtAllocNavMesh ()
 Allocates a navigation mesh object using the Detour allocator. 更多...
 
NAVMESH_API dtNavMeshQuery * dtAllocNavMeshQuery ()
 Allocates a query object using the Detour allocator. 更多...
 
NAVMESH_API bool dtCreateNavMeshData (dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize)
 Builds navigation mesh tile data from the provided tile creation data. 更多...
 
NAVMESH_API void dtFreeNavMesh (dtNavMesh *navmesh)
 Frees the specified navigation mesh object using the Detour allocator. 更多...
 
NAVMESH_API void dtFreeNavMeshQuery (dtNavMeshQuery *query)
 Frees the specified query object using the Detour allocator. 更多...
 

变量

static const int DT_MAX_AREAS = 64
 The maximum number of user defined area ids.
 
static const int DT_VERTS_PER_POLYGON = 6
 The maximum number of vertices per navigation polygon.
 

详细描述

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

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

类型定义说明

◆ 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.

函数说明

◆ dtAllocNavMesh()

NAVMESH_API dtNavMesh * dtAllocNavMesh ( )

Allocates a navigation mesh object using the Detour allocator.

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

◆ dtAllocNavMeshQuery()

NAVMESH_API dtNavMeshQuery * dtAllocNavMeshQuery ( )

Allocates a query object using the Detour allocator.

返回
An allocated query object, or null on failure.

◆ dtCreateNavMeshData()

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

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

参数
[in]paramsTile creation data.
[out]outDataThe resulting tile data.
[out]outDataSizeThe size of the tile data array.
返回
True if the tile data was successfully created.

◆ dtFreeNavMesh()

NAVMESH_API void dtFreeNavMesh ( dtNavMesh *  navmesh)

Frees the specified navigation mesh object using the Detour allocator.

参数
[in]navmeshA navigation mesh allocated using dtAllocNavMesh

◆ dtFreeNavMeshQuery()

NAVMESH_API void dtFreeNavMeshQuery ( dtNavMeshQuery *  query)

Frees the specified query object using the Detour allocator.

参数
[in]queryA query object allocated using dtAllocNavMeshQuery