From 3c3f940ff347924075785c55dd7870bbfd4ab975 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Fri, 25 Aug 2023 17:14:06 +0200 Subject: [PATCH] Renderer/DebugDrawer: Add DrawPoint --- include/Nazara/Renderer/DebugDrawer.hpp | 1 + include/Nazara/Renderer/DebugDrawer.inl | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/Nazara/Renderer/DebugDrawer.hpp b/include/Nazara/Renderer/DebugDrawer.hpp index dba65081e..1d916daa3 100644 --- a/include/Nazara/Renderer/DebugDrawer.hpp +++ b/include/Nazara/Renderer/DebugDrawer.hpp @@ -44,6 +44,7 @@ namespace Nz inline void DrawFrustum(const Frustumf& frustum, const Color& color); inline void DrawLine(const Vector3f& start, const Vector3f& end, const Color& color); inline void DrawLine(const Vector3f& start, const Vector3f& end, const Color& startColor, const Color& endColor); + inline void DrawPoint(const Vector3f& point, const Color& color, float boxSize = 0.1f); void DrawSkeleton(const Skeleton& skeleton, const Color& color); void Prepare(RenderFrame& renderFrame); diff --git a/include/Nazara/Renderer/DebugDrawer.inl b/include/Nazara/Renderer/DebugDrawer.inl index 90ba1a87d..c7735d5c5 100644 --- a/include/Nazara/Renderer/DebugDrawer.inl +++ b/include/Nazara/Renderer/DebugDrawer.inl @@ -61,6 +61,11 @@ namespace Nz endVertex.color = endColor; endVertex.position = end; } + + inline void DebugDrawer::DrawPoint(const Vector3f& point, const Color& color, float boxSize) + { + return DrawBox(Boxf(point - Vector3f(boxSize * 0.5f), Vector3f(boxSize)), color); + } } #include