From b42dfae6433a493a1744ca64e62b675486a9af15 Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Tue, 5 Aug 2025 16:24:32 -0400 Subject: [PATCH] Removed unnecessary accessor for convexVolumes --- RecastDemo/Include/InputGeom.h | 1 - RecastDemo/Source/ConvexVolumeTool.cpp | 2 +- RecastDemo/Source/Sample_SoloMesh.cpp | 2 +- RecastDemo/Source/Sample_TempObstacles.cpp | 2 +- RecastDemo/Source/Sample_TileMesh.cpp | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/RecastDemo/Include/InputGeom.h b/RecastDemo/Include/InputGeom.h index 0f1a3f2d..4f64e609 100644 --- a/RecastDemo/Include/InputGeom.h +++ b/RecastDemo/Include/InputGeom.h @@ -145,7 +145,6 @@ public: /// @name Box Volumes. ///@{ - [[nodiscard]] const ConvexVolume* getConvexVolumes() const { return convexVolumes; } void addConvexVolume(const float* verts, int nverts, float minh, float maxh, unsigned char area); void deleteConvexVolume(int i); void drawConvexVolumes(duDebugDraw* dd, bool highlight = false); diff --git a/RecastDemo/Source/ConvexVolumeTool.cpp b/RecastDemo/Source/ConvexVolumeTool.cpp index a0cb0421..76760971 100644 --- a/RecastDemo/Source/ConvexVolumeTool.cpp +++ b/RecastDemo/Source/ConvexVolumeTool.cpp @@ -176,7 +176,7 @@ void ConvexVolumeTool::handleClick(const float* /*s*/, const float* p, bool shif { // Delete int nearestIndex = -1; - const ConvexVolume* vols = geom->getConvexVolumes(); + const ConvexVolume* vols = geom->convexVolumes; for (int i = 0; i < geom->convexVolumeCount; ++i) { if (pointInPoly(vols[i].nverts, vols[i].verts, p) && p[1] >= vols[i].hmin && p[1] <= vols[i].hmax) diff --git a/RecastDemo/Source/Sample_SoloMesh.cpp b/RecastDemo/Source/Sample_SoloMesh.cpp index f0d455e2..a3481762 100644 --- a/RecastDemo/Source/Sample_SoloMesh.cpp +++ b/RecastDemo/Source/Sample_SoloMesh.cpp @@ -514,7 +514,7 @@ bool Sample_SoloMesh::build() // (Optional) Marks the surface type of voxels in an area defined by a convex volume. // Useful to mark areas of differing cost. - const ConvexVolume* vols = inputGeometry->getConvexVolumes(); + const ConvexVolume* vols = inputGeometry->convexVolumes; for (int i = 0; i < inputGeometry->convexVolumeCount; ++i) { rcMarkConvexPolyArea( diff --git a/RecastDemo/Source/Sample_TempObstacles.cpp b/RecastDemo/Source/Sample_TempObstacles.cpp index 84da11c2..d604fcf9 100644 --- a/RecastDemo/Source/Sample_TempObstacles.cpp +++ b/RecastDemo/Source/Sample_TempObstacles.cpp @@ -670,7 +670,7 @@ int Sample_TempObstacles::rasterizeTileLayers( } // (Optional) Mark areas. - const ConvexVolume* vols = inputGeometry->getConvexVolumes(); + const ConvexVolume* vols = inputGeometry->convexVolumes; for (int i = 0; i < inputGeometry->convexVolumeCount; ++i) { rcMarkConvexPolyArea( diff --git a/RecastDemo/Source/Sample_TileMesh.cpp b/RecastDemo/Source/Sample_TileMesh.cpp index 0f69f785..b30b9ffb 100644 --- a/RecastDemo/Source/Sample_TileMesh.cpp +++ b/RecastDemo/Source/Sample_TileMesh.cpp @@ -1028,7 +1028,7 @@ unsigned char* Sample_TileMesh::buildTileMesh( } // (Optional) Mark areas. - const ConvexVolume* convexVolumes = inputGeometry->getConvexVolumes(); + const ConvexVolume* convexVolumes = inputGeometry->convexVolumes; for (int i = 0; i < inputGeometry->convexVolumeCount; ++i) { rcMarkConvexPolyArea(