Use vectors to store offmesh connection data rather than arrays

This commit is contained in:
Graham Pentheny
2025-08-25 12:08:48 -04:00
parent 30d459ca73
commit 8de2dcef5f
6 changed files with 86 additions and 88 deletions

View File

@@ -1191,13 +1191,13 @@ unsigned char* Sample_TileMesh::buildTileMesh(
params.detailVertsCount = detailPolyMesh->nverts;
params.detailTris = detailPolyMesh->tris;
params.detailTriCount = detailPolyMesh->ntris;
params.offMeshConVerts = inputGeometry->offMeshConVerts;
params.offMeshConRad = inputGeometry->offMeshConRads;
params.offMeshConDir = inputGeometry->offMeshConDirs;
params.offMeshConAreas = inputGeometry->offMeshConAreas;
params.offMeshConFlags = inputGeometry->offMeshConFlags;
params.offMeshConUserID = inputGeometry->offMeshConId;
params.offMeshConCount = inputGeometry->offMeshConCount;
params.offMeshConVerts = inputGeometry->offmeshConnVerts.data();
params.offMeshConRad = inputGeometry->offmeshConnRadius.data();
params.offMeshConDir = inputGeometry->offmeshConnBidirectional.data();
params.offMeshConAreas = inputGeometry->offmeshConnArea.data();
params.offMeshConFlags = inputGeometry->offmeshConnFlags.data();
params.offMeshConUserID = inputGeometry->offmeshConnId.data();
params.offMeshConCount = static_cast<int>(inputGeometry->offmeshConnArea.size());
params.walkableHeight = agentHeight;
params.walkableRadius = agentRadius;
params.walkableClimb = agentMaxClimb;