Recast Navigation  1.0.35
rcConfig Struct Reference

Specifies a configuration to use when performing Recast builds. More...

#include <Recast.h>

Public Attributes

int width
 The width of the field along the x-axis. [Limit: >= 0] [Units: vx]. More...
 
int height
 The height of the field along the z-axis. [Limit: >= 0] [Units: vx]. More...
 
int tileSize
 The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx]. More...
 
int borderSize
 The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]. More...
 
float cellSizeXZ
 The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu]. More...
 
float cellSizeY
 The y-axis cell size to use for fields. [Limit: > 0] [Units: wu]. More...
 
float bmin [3]
 The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu]. More...
 
float bmax [3]
 The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu]. More...
 
float walkableSlopeAngle
 The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees]. More...
 
int walkableHeight
 Minimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. More...
 
int walkableClimb
 Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]. More...
 
int walkableRadius
 The distance to erode/shrink the walkable area of the heightfield away from obstructions. More...
 
int maxEdgeLen
 The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]. More...
 
float maxSimplificationError
 The maximum distance a simplfied contour's border edges should deviate the original raw contour. More...
 
int minRegionArea
 The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx]. More...
 
int mergeRegionArea
 Any regions with a span count smaller than this value will, if possible, be merged with larger regions. More...
 
int maxVertsPerPoly
 The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. More...
 
float detailSampleDist
 Sets the sampling distance to use when generating the detail mesh. More...
 
float detailSampleMaxError
 The maximum distance the detail mesh surface should deviate from heightfield data. More...
 

Description

Specifies a configuration to use when performing Recast builds.

The is a convenience structure that represents an aggregation of parameters used at different stages in the Recast build process. Some values are derived during the build process. Not all parameters are used for all build processes.

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 cellSizeXZ and cellSizeY.

In this documentation, the term 'field' refers to heightfield and contour data structures that define spacial information using an integer grid.

The upper and lower limits for the various parameters often depend on the platform's floating point accuraccy as well as interdependencies between the values of multiple parameters. See the individual parameter documentation for details.

Member Data Documentation

float rcConfig::bmax[3]

The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu].

float rcConfig::bmin[3]

The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu].

rcConfig::borderSize

The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx].

This value represents the the closest the walkable area of the heightfield should come to the xz-plane AABB of the field. It does not have any impact on the borders around internal obstructions.

rcConfig::cellSizeXZ

The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu].

cellSizeXZ and cellSizeY define voxel/grid/cell size. So their values have significant side effects on all parameters defined in voxel units.

The minimum value for this parameter depends on the platform's floating point accuracy, with the practical minimum usually around 0.05.

rcConfig::cellSizeY

The y-axis cell size to use for fields. [Limit: > 0] [Units: wu].

cellSizeY and cellSizeXZ define voxel/grid/cell size. So their values have significant side effects on all parameters defined in voxel units.

The minimum value for this parameter depends on the platform's floating point accuracy, with the practical minimum usually around 0.05.

float rcConfig::detailSampleDist

Sets the sampling distance to use when generating the detail mesh.

(For height detail only.) [Limits: 0 or >= 0.9] [Units: wu]

float rcConfig::detailSampleMaxError

The maximum distance the detail mesh surface should deviate from heightfield data.

(For height detail only.) [Limit: >=0] [Units: wu]

int rcConfig::height

The height of the field along the z-axis. [Limit: >= 0] [Units: vx].

rcConfig::maxEdgeLen

The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx].

Extra vertices will be inserted as needed to keep contour edges below this length. A value of zero effectively disables this feature.

rcConfig::maxSimplificationError

The maximum distance a simplfied contour's border edges should deviate the original raw contour.

[Limit: >=0] [Units: vx]

The effect of this parameter only applies to the xz-plane.

rcConfig::maxVertsPerPoly

The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.

[Limit: >= 3]

If the mesh data is to be used to construct a Detour navigation mesh, then the upper limit is limited to <= DT_VERTS_PER_POLYGON.

int rcConfig::mergeRegionArea

Any regions with a span count smaller than this value will, if possible, be merged with larger regions.

[Limit: >=0] [Units: vx]

rcConfig::minRegionArea

The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx].

Any regions that are smaller than this area will be marked as unwalkable. This is useful in removing useless regions that can sometimes form on geometry such as table tops, box tops, etc.

rcConfig::tileSize

The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx].

This field is only used when building multi-tile meshes.

rcConfig::walkableClimb

Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx].

Allows the mesh to flow over low lying obstructions such as curbs and up/down stairways. The value is usually set to how far up/down an agent can step.

rcConfig::walkableHeight

Minimum floor to 'ceiling' height that will still allow the floor area to be considered walkable.

[Limit: >= 3] [Units: vx]

Permits detection of overhangs in the source geometry that make the geometry below un-walkable. The value is usually set to the maximum agent height.

rcConfig::walkableRadius

The distance to erode/shrink the walkable area of the heightfield away from obstructions.

[Limit: >=0] [Units: vx]

In general, this is the closest any part of the final mesh should get to an obstruction in the source geometry. It is usually set to the maximum agent radius.

While a value of zero is legal, it is not recommended and can result in odd edge case issues.

rcConfig::walkableSlopeAngle

The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees].

The practical upper limit for this parameter is usually around 85 degrees.

int rcConfig::width

The width of the field along the x-axis. [Limit: >= 0] [Units: vx].


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