Add normalLength parameter to the DebugDrawer::DrawNormals (#163)

This commit is contained in:
HardCPP 2018-04-30 14:49:44 +02:00 committed by Jérôme Leclercq
parent 1c608596e1
commit 232a371fa5
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ namespace Nz
static void DrawCone(const Vector3f& origin, const Quaternionf& rotation, float angle, float length);
static void DrawLine(const Vector3f& p1, const Vector3f& p2);
static void DrawPoints(const Vector3f* ptr, unsigned int pointCount);
static void DrawNormals(const StaticMesh* subMesh);
static void DrawNormals(const StaticMesh* subMesh, float normalLength = 0.01f);
static void DrawTangents(const StaticMesh* subMesh);
static void EnableDepthBuffer(bool depthBuffer);

View File

@ -556,7 +556,7 @@ namespace Nz
}
}
void DebugDrawer::DrawNormals(const StaticMesh* subMesh)
void DebugDrawer::DrawNormals(const StaticMesh* subMesh, float normalLength)
{
if (!s_initialized && !Initialize())
{
@ -583,7 +583,7 @@ namespace Nz
outputVertex->position = inputVertex->position;
outputVertex++;
outputVertex->position = inputVertex->position + inputVertex->normal*0.01f;
outputVertex->position = inputVertex->position + inputVertex->normal*normalLength;
outputVertex++;
inputVertex++;