Renderer/DebugDrawer: Add DrawPoint

This commit is contained in:
SirLynix 2023-08-25 17:14:06 +02:00
parent efe36ca6e8
commit 3c3f940ff3
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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 <Nazara/Renderer/DebugOff.hpp>