mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-10-15 21:35:44 +00:00
Use a vector to store convex volumes rather than fixed-size array
This commit is contained in:
@@ -1013,16 +1013,15 @@ unsigned char* Sample_TileMesh::buildTileMesh(
|
||||
}
|
||||
|
||||
// (Optional) Mark areas.
|
||||
const ConvexVolume* convexVolumes = inputGeometry->convexVolumes;
|
||||
for (int i = 0; i < inputGeometry->convexVolumeCount; ++i)
|
||||
for (ConvexVolume& vol : inputGeometry->convexVolumes)
|
||||
{
|
||||
rcMarkConvexPolyArea(
|
||||
buildContext,
|
||||
convexVolumes[i].verts,
|
||||
convexVolumes[i].nverts,
|
||||
convexVolumes[i].hmin,
|
||||
convexVolumes[i].hmax,
|
||||
static_cast<unsigned char>(convexVolumes[i].area),
|
||||
vol.verts,
|
||||
vol.nverts,
|
||||
vol.hmin,
|
||||
vol.hmax,
|
||||
static_cast<unsigned char>(vol.area),
|
||||
*compactHeightfield);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user