Added DebugDrawer::Draw(position, size)

Draws a "size"-sized box centered on "position"


Former-commit-id: 9385762a4118fe76364faa5819fd9a94efceefbf
This commit is contained in:
Lynix 2015-01-03 22:32:56 +01:00
parent 7c47a93a72
commit 596f407a79
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class NAZARA_API NzDebugDrawer
static void Draw(const NzFrustumf& frustum);
static void Draw(const NzOrientedBoxf& orientedBox);
static void Draw(const NzSkeleton* skeleton);
static void Draw(const NzVector3f& position, float size = 0.1f);
static void DrawBinormals(const NzStaticMesh* subMesh);
static void DrawCone(const NzVector3f& origin, const NzQuaternionf& rotation, float angle, float length);
static void DrawLine(const NzVector3f& p1, const NzVector3f& p2);

View File

@ -363,6 +363,11 @@ void NzDebugDrawer::Draw(const NzSkeleton* skeleton)
}
}
void NzDebugDrawer::Draw(const NzVector3f& position, float size)
{
Draw(NzBoxf(position.x - size*0.5f, position.y - size*0.5f, position.z - size*0.5f, size, size, size));
}
void NzDebugDrawer::DrawBinormals(const NzStaticMesh* subMesh)
{
if (!Initialize())