This commit is contained in:
aozhiwei 2020-08-14 14:53:07 +08:00
parent f53ce64d02
commit d129fb5bb3
2 changed files with 13 additions and 8 deletions

View File

@ -210,14 +210,15 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
// Once all geometry is rasterized, we do initial pass of filtering to
// remove unwanted overhangs caused by the conservative rasterization
// as well as filter spans where the character cannot possibly stand.
#if 0
if (m_filterLowHangingObstacles)
rcFilterLowHangingWalkableObstacles(m_ctx, tcfg.walkableClimb, *rc.solid);
if (m_filterLedgeSpans)
rcFilterLedgeSpans(m_ctx, tcfg.walkableHeight, tcfg.walkableClimb, *rc.solid);
if (m_filterWalkableLowHeightSpans)
rcFilterWalkableLowHeightSpans(m_ctx, tcfg.walkableHeight, *rc.solid);
#endif
if (builder_params.kFilterLowHangingObstacles) {
rcFilterLowHangingWalkableObstacles(ctx, tcfg.walkableClimb, *rc.solid);
}
if (builder_params.kFilterLedgeSpans) {
rcFilterLedgeSpans(ctx, tcfg.walkableHeight, tcfg.walkableClimb, *rc.solid);
}
if (builder_params.kFilterWalkableLowHeightSpans) {
rcFilterWalkableLowHeightSpans(ctx, tcfg.walkableHeight, *rc.solid);
}
rc.chf = rcAllocCompactHeightfield();
if (!rc.chf) {

View File

@ -290,6 +290,10 @@ struct BuilderParams
const int kMaxTiles = 0;
const int kMaxPolysPerTile = 0;
const bool kFilterLowHangingObstacles = false;
const bool kFilterLedgeSpans = false;
const bool kFilterWalkableLowHeightSpans = false;
int grid_width = 0;
int grid_height = 0;
int tile_size = 0;