Kemena3D
Loading...
Searching...
No Matches
kemena::kNavBuildConfig Struct Reference

All parameters that control the Recast bake pipeline. More...

#include <knavmesh.h>

Public Attributes

float cellSize = 0.3f
 XZ voxel size (m). Smaller = finer mesh.
float cellHeight = 0.2f
 Y voxel size (m).
float agentHeight = 2.0f
 Minimum clear headroom (m).
float agentRadius = 0.6f
 Agent cylinder radius (m).
float agentMaxClimb = 0.9f
 Maximum step-up height (m).
float agentMaxSlope = 45.0f
 Maximum walkable slope (degrees).
float regionMinSize = 8.0f
 Discard regions smaller than this (cells²).
float regionMergeSize = 20.0f
 Merge regions smaller than this (cells²).
float edgeMaxLen = 12.0f
 Maximum edge length (m).
float edgeMaxError = 1.3f
 Maximum edge deviation from original (m).
int maxVertsPerPoly = 6
 Maximum vertices per navmesh polygon (2–6).
float detailSampleDist = 6.0f
 Detail mesh sample spacing (cells); 0 disables detail sampling.
float detailSampleMaxError = 1.0f
 Maximum detail mesh deviation from heightfield (cells).
kNavPartitionType partition = kNavPartitionType::Watershed
 Region partition algorithm.
float tileSize = 48.0f

Detailed Description

All parameters that control the Recast bake pipeline.

The defaults produce a navmesh suitable for a humanoid character (≈2 m tall, 0.6 m radius) in a typical game world with 1-metre units.

Member Data Documentation

◆ agentHeight

float kemena::kNavBuildConfig::agentHeight = 2.0f

Minimum clear headroom (m).

◆ agentMaxClimb

float kemena::kNavBuildConfig::agentMaxClimb = 0.9f

Maximum step-up height (m).

◆ agentMaxSlope

float kemena::kNavBuildConfig::agentMaxSlope = 45.0f

Maximum walkable slope (degrees).

◆ agentRadius

float kemena::kNavBuildConfig::agentRadius = 0.6f

Agent cylinder radius (m).

◆ cellHeight

float kemena::kNavBuildConfig::cellHeight = 0.2f

Y voxel size (m).

◆ cellSize

float kemena::kNavBuildConfig::cellSize = 0.3f

XZ voxel size (m). Smaller = finer mesh.

◆ detailSampleDist

float kemena::kNavBuildConfig::detailSampleDist = 6.0f

Detail mesh sample spacing (cells); 0 disables detail sampling.

◆ detailSampleMaxError

float kemena::kNavBuildConfig::detailSampleMaxError = 1.0f

Maximum detail mesh deviation from heightfield (cells).

◆ edgeMaxError

float kemena::kNavBuildConfig::edgeMaxError = 1.3f

Maximum edge deviation from original (m).

◆ edgeMaxLen

float kemena::kNavBuildConfig::edgeMaxLen = 12.0f

Maximum edge length (m).

◆ maxVertsPerPoly

int kemena::kNavBuildConfig::maxVertsPerPoly = 6

Maximum vertices per navmesh polygon (2–6).

◆ partition

kNavPartitionType kemena::kNavBuildConfig::partition = kNavPartitionType::Watershed

Region partition algorithm.

◆ regionMergeSize

float kemena::kNavBuildConfig::regionMergeSize = 20.0f

Merge regions smaller than this (cells²).

◆ regionMinSize

float kemena::kNavBuildConfig::regionMinSize = 8.0f

Discard regions smaller than this (cells²).

◆ tileSize

float kemena::kNavBuildConfig::tileSize = 48.0f

Tile size in voxel cells. Must be > 0 to enable dynamic obstacle support. 32–64 is a typical range; 0 falls back to a single-mesh build (no obstacles).


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