Recast Navigation
Navigation-mesh Toolset for Games
dtNavMeshCreateParams Struct Reference

Represents the source data used to build an navigation mesh tile. More...

#include <DetourNavMeshBuilder.h>

Public Attributes

Polygon Mesh Attributes

Used to create the base navigation graph.

See rcPolyMesh for details related to these attributes.

const unsigned short * verts
 The polygon mesh vertices. [(x, y, z) * vertCount] [Unit: vx]. More...
 
int vertCount
 The number vertices in the polygon mesh. [Limit: >= 3]. More...
 
const unsigned short * polys
 The polygon data. [Size: polyCount * 2 * nvp]. More...
 
const unsigned short * polyFlags
 The user defined flags assigned to each polygon. [Size: polyCount]. More...
 
const unsigned char * polyAreas
 The user defined area ids assigned to each polygon. [Size: polyCount]. More...
 
int polyCount
 Number of polygons in the mesh. [Limit: >= 1]. More...
 
int nvp
 Number maximum number of vertices per polygon. [Limit: >= 3]. More...
 
Height Detail Attributes (Optional)

See rcPolyMeshDetail for details related to these attributes.

const unsigned int * detailMeshes
 The height detail sub-mesh data. [Size: 4 * polyCount]. More...
 
const float * detailVerts
 The detail mesh vertices. [Size: 3 * detailVertsCount] [Unit: wu]. More...
 
int detailVertsCount
 The number of vertices in the detail mesh. More...
 
const unsigned char * detailTris
 The detail mesh triangles. [Size: 4 * detailTriCount]. More...
 
int detailTriCount
 The number of triangles in the detail mesh. More...
 
Off-Mesh Connections Attributes (Optional)

Used to define a custom point-to-point edge within the navigation graph, an off-mesh connection is a user defined traversable connection made up to two vertices, at least one of which resides within a navigation mesh polygon.

const float * offMeshConVerts
 Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * offMeshConCount] [Unit: wu]. More...
 
const float * offMeshConRad
 Off-mesh connection radii. [Size: offMeshConCount] [Unit: wu]. More...
 
const unsigned short * offMeshConFlags
 User defined flags assigned to the off-mesh connections. [Size: offMeshConCount]. More...
 
const unsigned char * offMeshConAreas
 User defined area ids assigned to the off-mesh connections. [Size: offMeshConCount]. More...
 
const unsigned char * offMeshConDir
 The permitted travel direction of the off-mesh connections. More...
 
const unsigned int * offMeshConUserID
 The user defined ids of the off-mesh connection. [Size: offMeshConCount]. More...
 
int offMeshConCount
 The number of off-mesh connections. [Limit: >= 0]. More...
 
Tile Attributes
Note
The tile grid/layer data can be left at zero if the destination is a single tile mesh.
unsigned int userId
 The user defined id of the tile. More...
 
int tileX
 The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.) More...
 
int tileY
 The tile's y-grid location within the multi-tile destination mesh. (Along the z-axis.) More...
 
int tileLayer
 The tile's layer within the layered destination mesh. Limit: >= 0 More...
 
float bmin [3]
 The minimum bounds of the tile. [(x, y, z)] [Unit: wu]. More...
 
float bmax [3]
 The maximum bounds of the tile. [(x, y, z)] [Unit: wu]. More...
 
General Configuration Attributes
float walkableHeight
 The agent height. [Unit: wu]. More...
 
float walkableRadius
 The agent radius. [Unit: wu]. More...
 
float walkableClimb
 The agent maximum traversable ledge. (Up/Down) [Unit: wu]. More...
 
float cs
 The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu]. More...
 
float ch
 The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu]. More...
 
bool buildBvTree
 True if a bounding volume tree should be built for the tile. More...
 

Description

Represents the source data used to build an navigation mesh tile.

This structure is used to marshal data between the Recast mesh generation pipeline and Detour navigation components.

See the rcPolyMesh and rcPolyMeshDetail documentation for detailed information related to mesh structure.

Units are usually in voxels (vx) or world units (wu). The units for voxels, grid size, and cell size are all based on the values of cs and ch.

The standard navigation mesh build process is to create tile data using dtCreateNavMeshData, then add the tile to a navigation mesh using either the dtNavMesh single tile init() function or the dtNavMesh::addTile() function.

See also
dtCreateNavMeshData

Member Data Documentation

◆ bmax

float dtNavMeshCreateParams::bmax[3]

The maximum bounds of the tile. [(x, y, z)] [Unit: wu].

◆ bmin

float dtNavMeshCreateParams::bmin[3]

The minimum bounds of the tile. [(x, y, z)] [Unit: wu].

◆ buildBvTree

bool dtNavMeshCreateParams::buildBvTree

True if a bounding volume tree should be built for the tile.

Note
The BVTree is not normally needed for layered navigation meshes.

◆ ch

float dtNavMeshCreateParams::ch

The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu].

◆ cs

float dtNavMeshCreateParams::cs

The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu].

◆ detailMeshes

const unsigned int* dtNavMeshCreateParams::detailMeshes

The height detail sub-mesh data. [Size: 4 * polyCount].

◆ detailTriCount

int dtNavMeshCreateParams::detailTriCount

The number of triangles in the detail mesh.

◆ detailTris

const unsigned char* dtNavMeshCreateParams::detailTris

The detail mesh triangles. [Size: 4 * detailTriCount].

◆ detailVerts

const float* dtNavMeshCreateParams::detailVerts

The detail mesh vertices. [Size: 3 * detailVertsCount] [Unit: wu].

◆ detailVertsCount

int dtNavMeshCreateParams::detailVertsCount

The number of vertices in the detail mesh.

◆ nvp

int dtNavMeshCreateParams::nvp

Number maximum number of vertices per polygon. [Limit: >= 3].

◆ offMeshConAreas

const unsigned char* dtNavMeshCreateParams::offMeshConAreas

User defined area ids assigned to the off-mesh connections. [Size: offMeshConCount].

◆ offMeshConCount

int dtNavMeshCreateParams::offMeshConCount

The number of off-mesh connections. [Limit: >= 0].

◆ offMeshConDir

const unsigned char* dtNavMeshCreateParams::offMeshConDir

The permitted travel direction of the off-mesh connections.

[Size: offMeshConCount]

0 = Travel only from endpoint A to endpoint B.
DT_OFFMESH_CON_BIDIR = Bidirectional travel.

◆ offMeshConFlags

const unsigned short* dtNavMeshCreateParams::offMeshConFlags

User defined flags assigned to the off-mesh connections. [Size: offMeshConCount].

◆ offMeshConRad

const float* dtNavMeshCreateParams::offMeshConRad

Off-mesh connection radii. [Size: offMeshConCount] [Unit: wu].

◆ offMeshConUserID

const unsigned int* dtNavMeshCreateParams::offMeshConUserID

The user defined ids of the off-mesh connection. [Size: offMeshConCount].

◆ offMeshConVerts

const float* dtNavMeshCreateParams::offMeshConVerts

Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * offMeshConCount] [Unit: wu].

◆ polyAreas

const unsigned char* dtNavMeshCreateParams::polyAreas

The user defined area ids assigned to each polygon. [Size: polyCount].

◆ polyCount

int dtNavMeshCreateParams::polyCount

Number of polygons in the mesh. [Limit: >= 1].

◆ polyFlags

const unsigned short* dtNavMeshCreateParams::polyFlags

The user defined flags assigned to each polygon. [Size: polyCount].

◆ polys

const unsigned short* dtNavMeshCreateParams::polys

The polygon data. [Size: polyCount * 2 * nvp].

◆ tileLayer

int dtNavMeshCreateParams::tileLayer

The tile's layer within the layered destination mesh. Limit: >= 0

◆ tileX

int dtNavMeshCreateParams::tileX

The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.)

◆ tileY

int dtNavMeshCreateParams::tileY

The tile's y-grid location within the multi-tile destination mesh. (Along the z-axis.)

◆ userId

unsigned int dtNavMeshCreateParams::userId

The user defined id of the tile.

◆ vertCount

int dtNavMeshCreateParams::vertCount

The number vertices in the polygon mesh. [Limit: >= 3].

◆ verts

const unsigned short* dtNavMeshCreateParams::verts

The polygon mesh vertices. [(x, y, z) * vertCount] [Unit: vx].

◆ walkableClimb

float dtNavMeshCreateParams::walkableClimb

The agent maximum traversable ledge. (Up/Down) [Unit: wu].

◆ walkableHeight

float dtNavMeshCreateParams::walkableHeight

The agent height. [Unit: wu].

◆ walkableRadius

float dtNavMeshCreateParams::walkableRadius

The agent radius. [Unit: wu].


The documentation for this struct was generated from the following file: