From ff5a6052c1b1197c35946516cafbe792b7ce909b Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Sun, 24 Aug 2025 15:16:18 -0400 Subject: [PATCH] Removed unnecessary matrix parameters from UI and overlay drawing methods --- RecastDemo/Include/Sample.h | 2 +- RecastDemo/Include/Sample_TempObstacles.h | 2 +- RecastDemo/Include/Tool_ConvexVolume.h | 2 +- RecastDemo/Include/Tool_Crowd.h | 2 +- RecastDemo/Include/Tool_NavMeshPrune.h | 2 +- RecastDemo/Include/Tool_NavMeshTester.h | 2 +- RecastDemo/Include/Tool_OffMeshConnection.h | 2 +- RecastDemo/Source/Sample_SoloMesh.cpp | 2 +- RecastDemo/Source/Sample_TempObstacles.cpp | 14 +++++++------- RecastDemo/Source/Sample_TileMesh.cpp | 4 ++-- RecastDemo/Source/Tool_Crowd.cpp | 2 +- RecastDemo/Source/Tool_NavMeshTester.cpp | 2 +- RecastDemo/Source/Tool_OffMeshConnection.cpp | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/RecastDemo/Include/Sample.h b/RecastDemo/Include/Sample.h index a8cb56b3..25ee9100 100644 --- a/RecastDemo/Include/Sample.h +++ b/RecastDemo/Include/Sample.h @@ -94,7 +94,7 @@ struct SampleTool virtual void render() = 0; virtual void drawMenuUI() = 0; - virtual void drawOverlayUI(double* proj, double* model, int* view) = 0; + virtual void drawOverlayUI() = 0; virtual void onClick(const float* rayStartPos, const float* rayHitPos, bool shift) = 0; virtual void onToggle() = 0; diff --git a/RecastDemo/Include/Sample_TempObstacles.h b/RecastDemo/Include/Sample_TempObstacles.h index 3ea4729f..83be175b 100644 --- a/RecastDemo/Include/Sample_TempObstacles.h +++ b/RecastDemo/Include/Sample_TempObstacles.h @@ -80,7 +80,7 @@ public: void getTilePos(const float* pos, int& tx, int& ty); void renderCachedTile(int tx, int ty, int type); - void renderCachedTileOverlay(int tx, int ty, double* proj, double* model, int* view) const; + void renderCachedTileOverlay(int tx, int ty) const; void addTempObstacle(const float* pos) const; void removeTempObstacle(const float* sp, const float* sq) const; diff --git a/RecastDemo/Include/Tool_ConvexVolume.h b/RecastDemo/Include/Tool_ConvexVolume.h index 8541c660..6d2f8d7d 100644 --- a/RecastDemo/Include/Tool_ConvexVolume.h +++ b/RecastDemo/Include/Tool_ConvexVolume.h @@ -50,5 +50,5 @@ public: void singleStep() override {} void update(const float) override {} void render() override; - void drawOverlayUI(double* proj, double* model, int* view) override; + void drawOverlayUI() override; }; diff --git a/RecastDemo/Include/Tool_Crowd.h b/RecastDemo/Include/Tool_Crowd.h index 1fe8ba82..839e9d93 100644 --- a/RecastDemo/Include/Tool_Crowd.h +++ b/RecastDemo/Include/Tool_Crowd.h @@ -126,5 +126,5 @@ public: void singleStep() override; void update(float dt) override; void render() override; - void drawOverlayUI(double* proj, double* model, int* view) override; + void drawOverlayUI() override; }; diff --git a/RecastDemo/Include/Tool_NavMeshPrune.h b/RecastDemo/Include/Tool_NavMeshPrune.h index dfaae8e7..fcd20276 100644 --- a/RecastDemo/Include/Tool_NavMeshPrune.h +++ b/RecastDemo/Include/Tool_NavMeshPrune.h @@ -59,5 +59,5 @@ public: void singleStep() override {} void update(const float /*dt*/) override {} void render() override; - void drawOverlayUI(double* proj, double* model, int* view) override; + void drawOverlayUI() override; }; diff --git a/RecastDemo/Include/Tool_NavMeshTester.h b/RecastDemo/Include/Tool_NavMeshTester.h index e30cb251..65dc3842 100644 --- a/RecastDemo/Include/Tool_NavMeshTester.h +++ b/RecastDemo/Include/Tool_NavMeshTester.h @@ -103,7 +103,7 @@ public: void singleStep() override; void update(const float dt) override; void render() override; - void drawOverlayUI(double* proj, double* model, int* view) override; + void drawOverlayUI() override; void recalc(); void drawAgent(const float* pos, float r, float h, float c, const unsigned int col) const; diff --git a/RecastDemo/Include/Tool_OffMeshConnection.h b/RecastDemo/Include/Tool_OffMeshConnection.h index d9494510..aadaec0f 100644 --- a/RecastDemo/Include/Tool_OffMeshConnection.h +++ b/RecastDemo/Include/Tool_OffMeshConnection.h @@ -49,7 +49,7 @@ public: void render() override; void drawMenuUI() override; - void drawOverlayUI(double* proj, double* model, int* view) override; + void drawOverlayUI() override; void onClick(const float* rayStartTime, const float* rayHitPos, bool shift) override; void onToggle() override {} diff --git a/RecastDemo/Source/Sample_SoloMesh.cpp b/RecastDemo/Source/Sample_SoloMesh.cpp index 651f9db6..ee622940 100644 --- a/RecastDemo/Source/Sample_SoloMesh.cpp +++ b/RecastDemo/Source/Sample_SoloMesh.cpp @@ -331,7 +331,7 @@ void Sample_SoloMesh::renderOverlay(double* proj, double* model, int* view) { if (tool) { - tool->drawOverlayUI(proj, model, view); + tool->drawOverlayUI(); } renderOverlayToolStates(proj, model, view); } diff --git a/RecastDemo/Source/Sample_TempObstacles.cpp b/RecastDemo/Source/Sample_TempObstacles.cpp index 5472db76..64d26e4d 100644 --- a/RecastDemo/Source/Sample_TempObstacles.cpp +++ b/RecastDemo/Source/Sample_TempObstacles.cpp @@ -264,7 +264,7 @@ void drawDetail(duDebugDraw* debugDraw, dtTileCache* tileCache, const int tileX, } } -void drawDetailOverlay(const dtTileCache* tileCache, const int tileX, const int tileY, double* proj, double* model, int* view) +void drawDetailOverlay(const dtTileCache* tileCache, const int tileX, const int tileY) { dtCompressedTileRef tiles[MAX_LAYERS]; const int ntiles = tileCache->getTilesAt(tileX, tileY, tiles, MAX_LAYERS); @@ -801,7 +801,7 @@ public: } } - void drawOverlayUI(double* proj, double* model, int* view) override + void drawOverlayUI() override { if (m_hitPosSet) { @@ -809,7 +809,7 @@ public: { int tileX = 0, tileY = 0; m_sample->getTilePos(m_hitPos, tileX, tileY); - m_sample->renderCachedTileOverlay(tileX, tileY, proj, model, view); + m_sample->renderCachedTileOverlay(tileX, tileY); } } } @@ -862,7 +862,7 @@ public: void singleStep() override {} void update(const float /*dt*/) override {} void render() override {} - void drawOverlayUI(double* /*proj*/, double* /*model*/, int* /*view*/) override {} + void drawOverlayUI() override {} }; Sample_TempObstacles::Sample_TempObstacles() @@ -1172,11 +1172,11 @@ void Sample_TempObstacles::renderCachedTile(const int tileX, const int tileY, co } } -void Sample_TempObstacles::renderCachedTileOverlay(const int tileX, const int tileY, double* proj, double* model, int* view) const +void Sample_TempObstacles::renderCachedTileOverlay(const int tileX, const int tileY) const { if (tileCache) { - drawDetailOverlay(tileCache, tileX, tileY, proj, model, view); + drawDetailOverlay(tileCache, tileX, tileY); } } @@ -1184,7 +1184,7 @@ void Sample_TempObstacles::renderOverlay(double* proj, double* model, int* view) { if (tool) { - tool->drawOverlayUI(proj, model, view); + tool->drawOverlayUI(); } renderOverlayToolStates(proj, model, view); diff --git a/RecastDemo/Source/Sample_TileMesh.cpp b/RecastDemo/Source/Sample_TileMesh.cpp index 175de097..684b3b88 100644 --- a/RecastDemo/Source/Sample_TileMesh.cpp +++ b/RecastDemo/Source/Sample_TileMesh.cpp @@ -177,7 +177,7 @@ public: glLineWidth(1.0f); } - void drawOverlayUI(double* proj, double* model, int* view) override + void drawOverlayUI() override { if (m_hitPosSet) { @@ -549,7 +549,7 @@ void Sample_TileMesh::renderOverlay(double* proj, double* model, int* view) if (tool) { - tool->drawOverlayUI(proj, model, view); + tool->drawOverlayUI(); } renderOverlayToolStates(proj, model, view); } diff --git a/RecastDemo/Source/Tool_Crowd.cpp b/RecastDemo/Source/Tool_Crowd.cpp index ebfe9d56..a193be29 100644 --- a/RecastDemo/Source/Tool_Crowd.cpp +++ b/RecastDemo/Source/Tool_Crowd.cpp @@ -1187,7 +1187,7 @@ void CrowdTool::update(const float dt) void CrowdTool::render() {} -void CrowdTool::drawOverlayUI(double* /*proj*/, double* /*model*/, int* /*view*/) +void CrowdTool::drawOverlayUI() { // Tool help if (mode == ToolMode::CREATE) diff --git a/RecastDemo/Source/Tool_NavMeshTester.cpp b/RecastDemo/Source/Tool_NavMeshTester.cpp index 33be21e0..ce694f72 100644 --- a/RecastDemo/Source/Tool_NavMeshTester.cpp +++ b/RecastDemo/Source/Tool_NavMeshTester.cpp @@ -1495,7 +1495,7 @@ void NavMeshTesterTool::render() } } -void NavMeshTesterTool::drawOverlayUI(double* proj, double* model, int* view) +void NavMeshTesterTool::drawOverlayUI() { if (sposSet) { diff --git a/RecastDemo/Source/Tool_OffMeshConnection.cpp b/RecastDemo/Source/Tool_OffMeshConnection.cpp index 3e47f461..9bdfe2d4 100644 --- a/RecastDemo/Source/Tool_OffMeshConnection.cpp +++ b/RecastDemo/Source/Tool_OffMeshConnection.cpp @@ -131,7 +131,7 @@ void OffMeshConnectionTool::render() } } -void OffMeshConnectionTool::drawOverlayUI(double* proj, double* model, int* view) +void OffMeshConnectionTool::drawOverlayUI() { if (hitPosSet) {