From d53b0b6a7fdc27ba3a07bf640cadd714a2e2e3f6 Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Tue, 5 Aug 2025 16:24:12 -0400 Subject: [PATCH] Renamed volumes to convexVolumes --- RecastDemo/Include/InputGeom.h | 4 ++-- RecastDemo/Source/InputGeom.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/RecastDemo/Include/InputGeom.h b/RecastDemo/Include/InputGeom.h index 9bf852a4..0f1a3f2d 100644 --- a/RecastDemo/Include/InputGeom.h +++ b/RecastDemo/Include/InputGeom.h @@ -107,7 +107,7 @@ public: /// @name Convex Volumes. ///@{ static const int MAX_VOLUMES = 256; - ConvexVolume volumes[MAX_VOLUMES]; + ConvexVolume convexVolumes[MAX_VOLUMES]; int convexVolumeCount = 0; ///@} @@ -145,7 +145,7 @@ public: /// @name Box Volumes. ///@{ - [[nodiscard]] const ConvexVolume* getConvexVolumes() const { return 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/InputGeom.cpp b/RecastDemo/Source/InputGeom.cpp index 377b79dc..fa9e42fc 100644 --- a/RecastDemo/Source/InputGeom.cpp +++ b/RecastDemo/Source/InputGeom.cpp @@ -295,7 +295,7 @@ bool InputGeom::loadGeomSet(rcContext* ctx, char* buffer, size_t bufferLen) // Convex volumes if (convexVolumeCount < MAX_VOLUMES) { - ConvexVolume* vol = &volumes[convexVolumeCount++]; + ConvexVolume* vol = &convexVolumes[convexVolumeCount++]; sscanf(row + 1, "%d %d %f %f", &vol->nverts, &vol->area, &vol->hmin, &vol->hmax); for (int i = 0; i < vol->nverts; ++i) { @@ -429,7 +429,7 @@ bool InputGeom::saveGeomSet(const BuildSettings* settings) // Convex volumes for (int i = 0; i < convexVolumeCount; ++i) { - ConvexVolume* vol = &volumes[i]; + ConvexVolume* vol = &convexVolumes[i]; fprintf(fp, "v %d %d %f %f\n", vol->nverts, vol->area, vol->hmin, vol->hmax); for (int j = 0; j < vol->nverts; ++j) { @@ -605,7 +605,7 @@ void InputGeom::addConvexVolume(const float* verts, const int nverts, const floa { return; } - ConvexVolume* vol = &volumes[convexVolumeCount++]; + ConvexVolume* vol = &convexVolumes[convexVolumeCount++]; memset(vol, 0, sizeof(ConvexVolume)); memcpy(vol->verts, verts, sizeof(float) * 3 * nverts); vol->hmin = minh; @@ -617,7 +617,7 @@ void InputGeom::addConvexVolume(const float* verts, const int nverts, const floa void InputGeom::deleteConvexVolume(int i) { convexVolumeCount--; - volumes[i] = volumes[convexVolumeCount]; + convexVolumes[i] = convexVolumes[convexVolumeCount]; } void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) @@ -627,7 +627,7 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) for (int i = 0; i < convexVolumeCount; ++i) { - const ConvexVolume* vol = &volumes[i]; + const ConvexVolume* vol = &convexVolumes[i]; unsigned int col = duTransCol(dd->areaToCol(vol->area), 32); for (int j = 0, k = vol->nverts - 1; j < vol->nverts; k = j++) { @@ -653,7 +653,7 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) dd->begin(DU_DRAW_LINES, 2.0f); for (int i = 0; i < convexVolumeCount; ++i) { - const ConvexVolume* vol = &volumes[i]; + const ConvexVolume* vol = &convexVolumes[i]; unsigned int col = duTransCol(dd->areaToCol(vol->area), 220); for (int j = 0, k = vol->nverts - 1; j < vol->nverts; k = j++) { @@ -672,7 +672,7 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) dd->begin(DU_DRAW_POINTS, 3.0f); for (int i = 0; i < convexVolumeCount; ++i) { - const ConvexVolume* vol = &volumes[i]; + const ConvexVolume* vol = &convexVolumes[i]; unsigned int col = duDarkenCol(duTransCol(dd->areaToCol(vol->area), 220)); for (int j = 0; j < vol->nverts; ++j) {