Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::AI::NavigationMeshConfig Class Reference

#include <NavMeshConfig.h>

Public Member Functions

 NavigationMeshConfig ()
 
void setCellSize (const F32 cellSize)
 
void setCellHeight (const F32 cellHeight)
 
void setTileSize (const I32 tileSize) noexcept
 
void setAgentHeight (const F32 agentHeight)
 
void setAgentRadius (const F32 agentRadius)
 
void setAgentMaxClimb (const F32 agentMaxClimb)
 
void setAgentMaxSlope (const F32 agentMaxSlope) noexcept
 
void setRegionMinSize (const I32 regionMinSize)
 
void setRegionMergeSize (const I32 regionMergeSize)
 
void setEdgeMaxLen (const I32 edgeMaxLength)
 
void setEdgeMaxError (const F32 edgeMaxError) noexcept
 
void setVertsPerPoly (const I32 vertsPerPoly) noexcept
 
void setDetailSampleDist (const F32 detailSampleDist)
 
void setDetailSampleMaxError (const F32 detailSampleMaxError)
 
void setKeepInterResults (const bool keepInterResults) noexcept
 
void base_setWalkableHeight (const I32 walkableHeight) noexcept
 
void base_setWalkableClimb (const I32 walkableClimb) noexcept
 
void base_setWalkableRadius (const I32 walkableRadius) noexcept
 
void base_setMaxEdgeLen (const I32 maxEdgeLen) noexcept
 
void base_setMinRegionArea (const I32 minRegionArea) noexcept
 
void base_setMergeRegionArea (const I32 mergeRegionArea) noexcept
 
void base_setDetailSampleDist (const F32 detailSampleDist) noexcept
 
void base_setDetailSampleMaxError (const F32 detailSampleMaxError) noexcept
 
F32 getCellSize () const noexcept
 
F32 getCellHeight () const noexcept
 
I32 getTileSize () const noexcept
 
F32 getAgentMaxSlope () const noexcept
 
F32 getAgentHeight () const noexcept
 
F32 getAgentMaxClimb () const noexcept
 
F32 getAgentRadius () const noexcept
 
I32 getEdgeMaxLen () const noexcept
 
F32 getEdgeMaxError () const noexcept
 
I32 getRegionMinSize () const noexcept
 
I32 getRegionMergeSize () const noexcept
 
I32 getVertsPerPoly () const noexcept
 
F32 getDetailSampleDist () const noexcept
 
F32 getDetailSampleMaxError () const noexcept
 
bool getKeepInterResults () const noexcept
 
I32 base_getWalkableHeight () const noexcept
 
I32 base_getWalkableClimb () const noexcept
 
I32 base_getWalkableRadius () const noexcept
 
I32 base_getMaxEdgeLen () const noexcept
 
I32 base_getMinRegionArea () const noexcept
 
I32 base_getMergeRegionArea () const noexcept
 
I32 base_getDetailSampleDist () const noexcept
 
I32 base_getDetailSampleMaxError () const noexcept
 

Private Member Functions

void eval ()
 

Private Attributes

I32 _tileSize = 48
 
F32 _cellSize = 0.3f
 
F32 _cellHeight = 0.2f
 
F32 _agentMaxSlope = 20
 
F32 _agentHeight = 2.5f
 
F32 _agentMaxClimb = 1
 
F32 _agentRadius = 0.5f
 
I32 _edgeMaxLen = 12
 
F32 _edgeMaxError = 1.3f
 
I32 _regionMinSize = 50
 
I32 _regionMergeSize = 20
 
I32 _vertsPerPoly = DT_VERTS_PER_POLYGON
 
F32 _detailSampleDist = 6
 
F32 _detailSampleMaxError = 1
 
bool _keepInterResults = false
 
I32 _walkableHeight
 
I32 _walkableClimb
 
I32 _walkableRadius
 
I32 _maxEdgeLen
 
I32 _minRegionArea
 
I32 _mergeRegionArea
 
F32 _base_detailSampleDist
 
F32 _base_detailSampleMaxError
 

Detailed Description

Definition at line 44 of file NavMeshConfig.h.

Constructor & Destructor Documentation

◆ NavigationMeshConfig()

Divide::AI::NavigationMeshConfig::NavigationMeshConfig ( )
inline

Definition at line 46 of file NavMeshConfig.h.

Member Function Documentation

◆ base_getDetailSampleDist()

I32 Divide::AI::NavigationMeshConfig::base_getDetailSampleDist ( ) const
inlinenoexcept

Definition at line 194 of file NavMeshConfig.h.

◆ base_getDetailSampleMaxError()

I32 Divide::AI::NavigationMeshConfig::base_getDetailSampleMaxError ( ) const
inlinenoexcept

Definition at line 195 of file NavMeshConfig.h.

◆ base_getMaxEdgeLen()

I32 Divide::AI::NavigationMeshConfig::base_getMaxEdgeLen ( ) const
inlinenoexcept

Definition at line 191 of file NavMeshConfig.h.

◆ base_getMergeRegionArea()

I32 Divide::AI::NavigationMeshConfig::base_getMergeRegionArea ( ) const
inlinenoexcept

Definition at line 193 of file NavMeshConfig.h.

◆ base_getMinRegionArea()

I32 Divide::AI::NavigationMeshConfig::base_getMinRegionArea ( ) const
inlinenoexcept

Definition at line 192 of file NavMeshConfig.h.

◆ base_getWalkableClimb()

I32 Divide::AI::NavigationMeshConfig::base_getWalkableClimb ( ) const
inlinenoexcept

Definition at line 189 of file NavMeshConfig.h.

◆ base_getWalkableHeight()

I32 Divide::AI::NavigationMeshConfig::base_getWalkableHeight ( ) const
inlinenoexcept

Definition at line 188 of file NavMeshConfig.h.

◆ base_getWalkableRadius()

I32 Divide::AI::NavigationMeshConfig::base_getWalkableRadius ( ) const
inlinenoexcept

Definition at line 190 of file NavMeshConfig.h.

◆ base_setDetailSampleDist()

void Divide::AI::NavigationMeshConfig::base_setDetailSampleDist ( const F32  detailSampleDist)
inlinenoexcept

Definition at line 164 of file NavMeshConfig.h.

◆ base_setDetailSampleMaxError()

void Divide::AI::NavigationMeshConfig::base_setDetailSampleMaxError ( const F32  detailSampleMaxError)
inlinenoexcept

Definition at line 168 of file NavMeshConfig.h.

◆ base_setMaxEdgeLen()

void Divide::AI::NavigationMeshConfig::base_setMaxEdgeLen ( const I32  maxEdgeLen)
inlinenoexcept

Definition at line 152 of file NavMeshConfig.h.

◆ base_setMergeRegionArea()

void Divide::AI::NavigationMeshConfig::base_setMergeRegionArea ( const I32  mergeRegionArea)
inlinenoexcept

Definition at line 160 of file NavMeshConfig.h.

◆ base_setMinRegionArea()

void Divide::AI::NavigationMeshConfig::base_setMinRegionArea ( const I32  minRegionArea)
inlinenoexcept

Definition at line 156 of file NavMeshConfig.h.

◆ base_setWalkableClimb()

void Divide::AI::NavigationMeshConfig::base_setWalkableClimb ( const I32  walkableClimb)
inlinenoexcept

Definition at line 144 of file NavMeshConfig.h.

◆ base_setWalkableHeight()

void Divide::AI::NavigationMeshConfig::base_setWalkableHeight ( const I32  walkableHeight)
inlinenoexcept

Definition at line 140 of file NavMeshConfig.h.

◆ base_setWalkableRadius()

void Divide::AI::NavigationMeshConfig::base_setWalkableRadius ( const I32  walkableRadius)
inlinenoexcept

Definition at line 148 of file NavMeshConfig.h.

◆ eval()

void Divide::AI::NavigationMeshConfig::eval ( )
inlineprivate

Derive non-directly set parameters This is the default behaviour and these parameters can be overridden using base_ setters.

Definition at line 203 of file NavMeshConfig.h.

◆ getAgentHeight()

F32 Divide::AI::NavigationMeshConfig::getAgentHeight ( ) const
inlinenoexcept

Definition at line 176 of file NavMeshConfig.h.

◆ getAgentMaxClimb()

F32 Divide::AI::NavigationMeshConfig::getAgentMaxClimb ( ) const
inlinenoexcept

Definition at line 177 of file NavMeshConfig.h.

◆ getAgentMaxSlope()

F32 Divide::AI::NavigationMeshConfig::getAgentMaxSlope ( ) const
inlinenoexcept

Definition at line 175 of file NavMeshConfig.h.

◆ getAgentRadius()

F32 Divide::AI::NavigationMeshConfig::getAgentRadius ( ) const
inlinenoexcept

Definition at line 178 of file NavMeshConfig.h.

◆ getCellHeight()

F32 Divide::AI::NavigationMeshConfig::getCellHeight ( ) const
inlinenoexcept

Definition at line 173 of file NavMeshConfig.h.

◆ getCellSize()

F32 Divide::AI::NavigationMeshConfig::getCellSize ( ) const
inlinenoexcept

Definition at line 172 of file NavMeshConfig.h.

◆ getDetailSampleDist()

F32 Divide::AI::NavigationMeshConfig::getDetailSampleDist ( ) const
inlinenoexcept

Definition at line 184 of file NavMeshConfig.h.

◆ getDetailSampleMaxError()

F32 Divide::AI::NavigationMeshConfig::getDetailSampleMaxError ( ) const
inlinenoexcept

Definition at line 185 of file NavMeshConfig.h.

◆ getEdgeMaxError()

F32 Divide::AI::NavigationMeshConfig::getEdgeMaxError ( ) const
inlinenoexcept

Definition at line 180 of file NavMeshConfig.h.

◆ getEdgeMaxLen()

I32 Divide::AI::NavigationMeshConfig::getEdgeMaxLen ( ) const
inlinenoexcept

Definition at line 179 of file NavMeshConfig.h.

◆ getKeepInterResults()

bool Divide::AI::NavigationMeshConfig::getKeepInterResults ( ) const
inlinenoexcept

Definition at line 186 of file NavMeshConfig.h.

◆ getRegionMergeSize()

I32 Divide::AI::NavigationMeshConfig::getRegionMergeSize ( ) const
inlinenoexcept

Definition at line 182 of file NavMeshConfig.h.

◆ getRegionMinSize()

I32 Divide::AI::NavigationMeshConfig::getRegionMinSize ( ) const
inlinenoexcept

Definition at line 181 of file NavMeshConfig.h.

◆ getTileSize()

I32 Divide::AI::NavigationMeshConfig::getTileSize ( ) const
inlinenoexcept

Definition at line 174 of file NavMeshConfig.h.

◆ getVertsPerPoly()

I32 Divide::AI::NavigationMeshConfig::getVertsPerPoly ( ) const
inlinenoexcept

Definition at line 183 of file NavMeshConfig.h.

◆ setAgentHeight()

void Divide::AI::NavigationMeshConfig::setAgentHeight ( const F32  agentHeight)
inline

Definition at line 71 of file NavMeshConfig.h.

◆ setAgentMaxClimb()

void Divide::AI::NavigationMeshConfig::setAgentMaxClimb ( const F32  agentMaxClimb)
inline

Definition at line 81 of file NavMeshConfig.h.

◆ setAgentMaxSlope()

void Divide::AI::NavigationMeshConfig::setAgentMaxSlope ( const F32  agentMaxSlope)
inlinenoexcept

Definition at line 86 of file NavMeshConfig.h.

◆ setAgentRadius()

void Divide::AI::NavigationMeshConfig::setAgentRadius ( const F32  agentRadius)
inline

Definition at line 76 of file NavMeshConfig.h.

◆ setCellHeight()

void Divide::AI::NavigationMeshConfig::setCellHeight ( const F32  cellHeight)
inline

Definition at line 59 of file NavMeshConfig.h.

◆ setCellSize()

void Divide::AI::NavigationMeshConfig::setCellSize ( const F32  cellSize)
inline

Definition at line 54 of file NavMeshConfig.h.

◆ setDetailSampleDist()

void Divide::AI::NavigationMeshConfig::setDetailSampleDist ( const F32  detailSampleDist)
inline

Definition at line 122 of file NavMeshConfig.h.

◆ setDetailSampleMaxError()

void Divide::AI::NavigationMeshConfig::setDetailSampleMaxError ( const F32  detailSampleMaxError)
inline

Definition at line 127 of file NavMeshConfig.h.

◆ setEdgeMaxError()

void Divide::AI::NavigationMeshConfig::setEdgeMaxError ( const F32  edgeMaxError)
inlinenoexcept

Definition at line 111 of file NavMeshConfig.h.

◆ setEdgeMaxLen()

void Divide::AI::NavigationMeshConfig::setEdgeMaxLen ( const I32  edgeMaxLength)
inline

Definition at line 106 of file NavMeshConfig.h.

◆ setKeepInterResults()

void Divide::AI::NavigationMeshConfig::setKeepInterResults ( const bool  keepInterResults)
inlinenoexcept

Definition at line 132 of file NavMeshConfig.h.

◆ setRegionMergeSize()

void Divide::AI::NavigationMeshConfig::setRegionMergeSize ( const I32  regionMergeSize)
inline

Definition at line 98 of file NavMeshConfig.h.

◆ setRegionMinSize()

void Divide::AI::NavigationMeshConfig::setRegionMinSize ( const I32  regionMinSize)
inline

Definition at line 93 of file NavMeshConfig.h.

◆ setTileSize()

void Divide::AI::NavigationMeshConfig::setTileSize ( const I32  tileSize)
inlinenoexcept

Definition at line 64 of file NavMeshConfig.h.

◆ setVertsPerPoly()

void Divide::AI::NavigationMeshConfig::setVertsPerPoly ( const I32  vertsPerPoly)
inlinenoexcept

Definition at line 115 of file NavMeshConfig.h.

Member Data Documentation

◆ _agentHeight

F32 Divide::AI::NavigationMeshConfig::_agentHeight = 2.5f
private

The height of an agent. Defines the minimum height that agents can walk under. Parts of the navmesh with lower ceilings will be pruned off.

This parameter serves at setting walkableHeight (minTraversableHeight) parameter, precision of this parameter is determined by cellHeight (ch).

Definition at line 270 of file NavMeshConfig.h.

◆ _agentMaxClimb

F32 Divide::AI::NavigationMeshConfig::_agentMaxClimb = 1
private

The Maximum ledge height that is considered to still be traversable. This parameter serves at setting walkableClimb (maxTraversableStep) parameter, precision of this parameter is determined by cellHeight (ch). [Limit: >=0] 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.

Definition at line 280 of file NavMeshConfig.h.

◆ _agentMaxSlope

F32 Divide::AI::NavigationMeshConfig::_agentMaxSlope = 20
private

The maximum slope that is considered traversable (in degrees). [Limits: 0 <= value < 90] The practical upper limit for this parameter is usually around 85 degrees.

Also called maxTraversableSlope

Definition at line 260 of file NavMeshConfig.h.

◆ _agentRadius

F32 Divide::AI::NavigationMeshConfig::_agentRadius = 0.5f
private

The radius on the xz (ground) plane of the circle that describes the agent (character) size. Serves at setting walkableRadius (traversableAreaBorderSize) parameter, the precision of walkableRadius is affected by cellSize (cs).

This parameter is also used by DetourCrowd to determine the area other agents have to avoid in order not to collide with an agent. The distance to erode/shrink the walkable area of the heightfield away from obstructions. [Limit: >=0]

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.

Definition at line 297 of file NavMeshConfig.h.

◆ _base_detailSampleDist

F32 Divide::AI::NavigationMeshConfig::_base_detailSampleDist
private

Sets the sampling distance to use when generating the detail mesh. (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu]

Also called contourSampleDistance Sets the sampling distance to use when matching the detail mesh to the surface of the original geometry. Impacts how well the final detail mesh conforms to the surface contour of the original geometry. Higher values result in a detail mesh which conforms more closely to the original geometry's surface at the cost of a higher final triangle count and higher processing cost. Setting this argument to less than 0.9 disables this functionality.

The difference between this parameter and edge matching (edgeMaxError) is that this parameter operates on the height rather than the xz-plane. It also matches the entire detail mesh surface to the contour of the original geometry. Edge matching only matches edges of meshes to the contour of the original geometry.

Definition at line 492 of file NavMeshConfig.h.

◆ _base_detailSampleMaxError

F32 Divide::AI::NavigationMeshConfig::_base_detailSampleMaxError
private

The maximum distance the detail mesh surface should deviate from heightfield data. (For height detail only.) [Limit: >=0] [Units: wu]

Also called contourMaxDeviation The maximum distance the surface of the detail mesh may deviate from the surface of the original geometry. The accuracy is impacted by contourSampleDistance (detailSampleDist). The value of this parameter has no meaning if contourSampleDistance is set to zero. Setting the value to zero is not recommended since it can result in a large increase in the number of triangles in the final detail mesh at a high processing cost. This parameter has no impact if contourSampleDistance is set to zero.

Definition at line 506 of file NavMeshConfig.h.

◆ _cellHeight

F32 Divide::AI::NavigationMeshConfig::_cellHeight = 0.2f
private

Cellheight (ch) is the height resolution used when sampling the source geometry. The height of the voxels in voxel fields. Height is associated with the y-axis of the source geometry. A smaller value allows for the final meshes to more closely match the source geometry at a potentially higher processing cost. (Unlike cellSize, using a lower value for cellHeight does not significantly increase memory use.)

The y-axis cell size to use for fields. [Limit: > 0] [Units: wu]. cs and ch 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.

Setting ch lower will result in more accurate detection of areas the agent can still pass under, as min walkable height is discretisized in number of cells. Also walkableClimb's precision is affected by ch in the same way, along with some other parameters.

Definition at line 251 of file NavMeshConfig.h.

◆ _cellSize

F32 Divide::AI::NavigationMeshConfig::_cellSize = 0.3f
private

Cellsize (cs) is the width and depth resolution used when sampling the source geometry. The width and depth of the cell columns that make up voxel fields. Cells are laid out on the width/depth plane of voxel fields. Width is associated with the x-axis of the source geometry. Depth is associated with the z-axis. A lower value allows for the generated meshes to more closely match the source geometry, but at a higher processing and memory cost. The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu]. cs and ch 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.

Definition at line 230 of file NavMeshConfig.h.

◆ _detailSampleDist

F32 Divide::AI::NavigationMeshConfig::_detailSampleDist = 6
private

Sets the sampling distance to use when generating the detail mesh. (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu]

Also called contourSampleDistance Sets the sampling distance to use when matching the detail mesh to the surface of the original geometry. Impacts how well the final detail mesh conforms to the surface contour of the original geometry. Higher values result in a detail mesh which conforms more closely to the original geometry's surface at the cost of a higher final triangle count and higher processing cost. Setting this argument to less than 0.9 disables this functionality.

Definition at line 364 of file NavMeshConfig.h.

◆ _detailSampleMaxError

F32 Divide::AI::NavigationMeshConfig::_detailSampleMaxError = 1
private

The maximum distance the detail mesh surface should deviate from heightfield data. (For height detail only.) [Limit: >=0] [Units: wu]

Also called contourMaxDeviation The maximum distance the surface of the detail mesh may deviate from the surface of the original geometry. The accuracy is impacted by contourSampleDistance. The value of this parameter has no meaning if contourSampleDistance is set to zero. Setting the value to zero is not recommended since it can result in a large increase in the number of triangles in the final detail mesh at a high processing cost. Stronly related to detailSampleDist (contourSampleDistance).

Definition at line 378 of file NavMeshConfig.h.

◆ _edgeMaxError

F32 Divide::AI::NavigationMeshConfig::_edgeMaxError = 1.3f
private

The maximum distance a simplfied contour's border edges should deviate the original raw contour. (edge matching) [Limit: >=0] [Units: wu] The effect of this parameter only applies to the xz-plane.

Also called maxSimplificationError or edgeMaxDeviation The maximum distance the edges of meshes may deviate from the source geometry. A lower value will result in mesh edges following the xz-plane geometry contour more accurately at the expense of an increased triangle count. A value to zero is not recommended since it can result in a large increase in the number of polygons in the final meshes at a high processing cost.

Definition at line 320 of file NavMeshConfig.h.

◆ _edgeMaxLen

I32 Divide::AI::NavigationMeshConfig::_edgeMaxLen = 12
private

The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] Extra vertices will be inserted as needed to keep contour edges below this length. A value of zero effectively disables this feature. Serves at setting maxEdgeLen, the precision of maxEdgeLen is affected by cellSize (cs).

Definition at line 306 of file NavMeshConfig.h.

◆ _keepInterResults

bool Divide::AI::NavigationMeshConfig::_keepInterResults = false
private

Determines whether intermediary results are stored in OgreRecast class or whether they are removed after navmesh creation.

Definition at line 384 of file NavMeshConfig.h.

◆ _maxEdgeLen

I32 Divide::AI::NavigationMeshConfig::_maxEdgeLen
private

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.

Also called maxEdgeLength The maximum length of polygon edges that represent the border of meshes. More vertices will be added to border edges if this value is exceeded for a particular edge. In certain cases this will reduce the number of long thin triangles. A value of zero will disable this feature.

Definition at line 445 of file NavMeshConfig.h.

◆ _mergeRegionArea

I32 Divide::AI::NavigationMeshConfig::_mergeRegionArea
private

Any regions with a span count smaller than this value will, if possible, be merged with larger regions. [Limit: >=0] [Units: vx]

Also called mergeRegionSize or mergeRegionArea Any regions smaller than this size will, if possible, be merged with larger regions. Value is in voxels. Helps reduce the number of small regions. This is especially an issue in diagonal path regions where inherent faults in the region generation algorithm can result in unnecessarily small regions. Small regions are left unchanged if they cannot be legally merged with a neighbor region. (E.g. Merging will result in a non-simple polygon.)

Definition at line 473 of file NavMeshConfig.h.

◆ _minRegionArea

I32 Divide::AI::NavigationMeshConfig::_minRegionArea
private

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.

Also called minUnconnectedRegionSize The minimum region size for unconnected (island) regions. The value is in voxels. Regions that are not connected to any other region and are smaller than this size will be culled before mesh generation. I.e. They will no longer be considered traversable.

Definition at line 459 of file NavMeshConfig.h.

◆ _regionMergeSize

I32 Divide::AI::NavigationMeshConfig::_regionMergeSize = 20
private

Any regions with a span count smaller than this value will, if possible, be merged with larger regions. [Limit: >=0] [Units: vx] Serves at setting MergeRegionArea, which will be set to the square of this value (the regions are square, thus area=size*size)

Definition at line 338 of file NavMeshConfig.h.

◆ _regionMinSize

I32 Divide::AI::NavigationMeshConfig::_regionMinSize = 50
private

The minimum number of cells allowed to form isolated island areas (size). [Limit: >=0] 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. Serves at setting minRegionArea, which will be set to the square of this value (the regions are square, thus area=size*size)

Definition at line 330 of file NavMeshConfig.h.

◆ _tileSize

I32 Divide::AI::NavigationMeshConfig::_tileSize = 48
private

Tilesize is the number of (recast) cells per tile. (a multiple of 8 between 16 and 128)

Definition at line 215 of file NavMeshConfig.h.

◆ _vertsPerPoly

I32 Divide::AI::NavigationMeshConfig::_vertsPerPoly = DT_VERTS_PER_POLYGON
private

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 (=6).

Also called maxVertsPerPoly The maximum number of vertices per polygon for polygons generated during the voxel to polygon conversion process. Higher values increase processing cost, but can also result in better formed polygons in the final meshes. A value of around 6 is generally adequate with diminishing returns for higher values.

Definition at line 351 of file NavMeshConfig.h.

◆ _walkableClimb

I32 Divide::AI::NavigationMeshConfig::_walkableClimb
private

Maximum ledge height that is considered to still be traversable, in number of cells (height). [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.

Also called maxTraversableStep Represents the maximum ledge height that is considered to still be traversable. Prevents minor deviations in height from improperly showing as obstructions. Permits detection of stair-like structures, curbs, etc.

Definition at line 412 of file NavMeshConfig.h.

◆ _walkableHeight

I32 Divide::AI::NavigationMeshConfig::_walkableHeight
private

Minimum height in number of (voxel) cells that the ceiling needs to be for an agent to be able to walk under. Related to cellHeight (ch) and agentHeight.

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.

Also called minTraversableHeight This value should be at least two times the value of cellHeight in order to get good results.

Definition at line 399 of file NavMeshConfig.h.

◆ _walkableRadius

I32 Divide::AI::NavigationMeshConfig::_walkableRadius
private

The distance to erode/shrink the walkable area of the heightfield away from obstructions, in cellsize units. [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.

Also called traversableAreaBorderSize Represents the closest any part of a mesh can get to an obstruction in the source geometry. Usually this value is set to the maximum bounding radius of agents utilizing the meshes for navigation decisions.

This value must be greater than the cellSize to have an effect. The actual border will be larger around ledges if ledge clipping is enabled. See the clipLedges parameter for more information. The actual border area will be larger if smoothingTreshold is > 0. See the smoothingThreshold parameter for more information.

Definition at line 431 of file NavMeshConfig.h.


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