From 94acdde4244f8d61156a5ff6bff75b46cb85e1fb Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Sat, 4 Oct 2025 14:07:31 -0400 Subject: [PATCH] Rename triareas to triAreas --- RecastDemo/Include/Sample_SoloMesh.h | 2 +- RecastDemo/Source/Sample_SoloMesh.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RecastDemo/Include/Sample_SoloMesh.h b/RecastDemo/Include/Sample_SoloMesh.h index a9b686e0..cdb6b408 100644 --- a/RecastDemo/Include/Sample_SoloMesh.h +++ b/RecastDemo/Include/Sample_SoloMesh.h @@ -30,7 +30,7 @@ protected: rcConfig config{}; - unsigned char* triareas = nullptr; + unsigned char* triAreas = nullptr; rcHeightfield* heightfield = nullptr; rcCompactHeightfield* compactHeightfield = nullptr; rcContourSet* contourSet = nullptr; diff --git a/RecastDemo/Source/Sample_SoloMesh.cpp b/RecastDemo/Source/Sample_SoloMesh.cpp index b48474a3..d396362b 100644 --- a/RecastDemo/Source/Sample_SoloMesh.cpp +++ b/RecastDemo/Source/Sample_SoloMesh.cpp @@ -63,8 +63,8 @@ Sample_SoloMesh::~Sample_SoloMesh() void Sample_SoloMesh::cleanup() { - delete[] triareas; - triareas = nullptr; + delete[] triAreas; + triAreas = nullptr; rcFreeHeightField(heightfield); heightfield = nullptr; rcFreeCompactHeightfield(compactHeightfield); @@ -429,22 +429,22 @@ bool Sample_SoloMesh::build() // triangles as unwalkable. // If you have multiple meshes you need to process, allocate // an array which can hold the max number of triangles you need to process. - triareas = new unsigned char[numTris]; - if (!triareas) + triAreas = new unsigned char[numTris]; + if (!triAreas) { buildContext->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'm_triareas' (%d).", numTris); return false; } - memset(triareas, 0, numTris * sizeof(unsigned char)); + memset(triAreas, 0, numTris * sizeof(unsigned char)); // Record which triangles in the input mesh are walkable. // This information is recorded in m_triareas - rcMarkWalkableTriangles(buildContext, config.walkableSlopeAngle, verts, numVerts, tris, numTris, triareas); + rcMarkWalkableTriangles(buildContext, config.walkableSlopeAngle, verts, numVerts, tris, numTris, triAreas); // Rasterize the input mesh // If your have multiple meshes, you can transform them, calculate the // terrain type for each mesh and rasterize them here. - if (!rcRasterizeTriangles(buildContext, verts, numVerts, tris, triareas, numTris, *heightfield, config.walkableClimb)) + if (!rcRasterizeTriangles(buildContext, verts, numVerts, tris, triAreas, numTris, *heightfield, config.walkableClimb)) { buildContext->log(RC_LOG_ERROR, "buildNavigation: Could not rasterize triangles."); return false;