refactor: annotation builder

This commit is contained in:
ikpil 2023-09-23 07:57:47 +09:00
parent 707d91afea
commit 4f2cc63886
2 changed files with 9 additions and 7 deletions

View File

@ -54,9 +54,6 @@ public class JumpLinkBuilderSampleTool : ISampleTool
public void Layout()
{
if (0 >= _sample.GetRecastResults().Count)
return;
ImGui.Text("Options");
ImGui.Separator();
ImGui.SliderFloat("Ground Tolerance", ref _cfg.groundTolerance, 0f, 2f, "%.2f");
@ -82,6 +79,7 @@ public class JumpLinkBuilderSampleTool : ISampleTool
//int buildTypes = 0;
ImGui.CheckboxFlags("Climb Down", ref _cfg.buildTypes, JumpLinkType.EDGE_CLIMB_DOWN.Bit);
ImGui.CheckboxFlags("Edge Jump", ref _cfg.buildTypes, JumpLinkType.EDGE_JUMP.Bit);
ImGui.NewLine();
//option.buildTypes = buildTypes;
bool build = false;
@ -98,12 +96,17 @@ public class JumpLinkBuilderSampleTool : ISampleTool
if (build || _cfg.buildOffMeshConnections)
{
var geom = _sample.GetInputGeom();
var settings = _sample.GetSettings();
if (0 < _sample.GetRecastResults().Count)
{
var geom = _sample.GetInputGeom();
var settings = _sample.GetSettings();
_tool.Build(geom, settings, _sample.GetRecastResults(), _cfg);
_tool.Build(geom, settings, _sample.GetRecastResults(), _cfg);
}
}
ImGui.NewLine();
ImGui.Text("Debug Draw Options");
ImGui.Separator();
//int newFlags = 0;

View File

@ -23,7 +23,6 @@ namespace DotRecast.Recast.Toolset.Tools
return "Annotation Builder";
}
public void Clear()
{
_annotationBuilder = null;