From 1968d90609cdc008eef59dc720dfee2f7492cb71 Mon Sep 17 00:00:00 2001 From: ikpil Date: Thu, 27 Jul 2023 06:31:16 +0900 Subject: [PATCH] use DebugDrawCross --- src/DotRecast.Recast.Demo/Tools/TileTool.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/DotRecast.Recast.Demo/Tools/TileTool.cs b/src/DotRecast.Recast.Demo/Tools/TileTool.cs index 172c368..f4c4b02 100644 --- a/src/DotRecast.Recast.Demo/Tools/TileTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TileTool.cs @@ -67,20 +67,10 @@ public class TileTool : IRcTool if (_hitPosSet) { var s = _impl.GetSample().GetSettings().agentRadius; - dd.Begin(LINES, 2.0f); - dd.Vertex(_hitPos.x - s, _hitPos.y + 0.1f, _hitPos.z, DuRGBA(0, 0, 0, 128)); - dd.Vertex(_hitPos.x + s, _hitPos.y + 0.1f, _hitPos.z, DuRGBA(0, 0, 0, 128)); - dd.Vertex(_hitPos.x, _hitPos.y - s + 0.1f, _hitPos.z, DuRGBA(0, 0, 0, 128)); - dd.Vertex(_hitPos.x, _hitPos.y + s + 0.1f, _hitPos.z, DuRGBA(0, 0, 0, 128)); - dd.Vertex(_hitPos.x, _hitPos.y + 0.1f, _hitPos.z - s, DuRGBA(0, 0, 0, 128)); - dd.Vertex(_hitPos.x, _hitPos.y + 0.1f, _hitPos.z + s, DuRGBA(0, 0, 0, 128)); - dd.End(); - } - - if (_hitPosSet) - { RcVec3f m_lastBuiltTileBmin = _hitPos - RcVec3f.One; RcVec3f m_lastBuiltTileBmax = _hitPos + RcVec3f.One; + + dd.DebugDrawCross(_hitPos.x, _hitPos.y + 0.1f, _hitPos.z, s, DuRGBA(0, 0, 0, 128), 2.0f); dd.DebugDrawBoxWire( m_lastBuiltTileBmin.x, m_lastBuiltTileBmin.y, m_lastBuiltTileBmin.z, m_lastBuiltTileBmax.x, m_lastBuiltTileBmax.y, m_lastBuiltTileBmax.z,