forked from mirror/DotRecast
rename
This commit is contained in:
parent
97c426966b
commit
ddcf05b213
|
@ -63,7 +63,7 @@ public class JumpLinkBuilderTool : IRcTool
|
||||||
var option = _impl.GetOption();
|
var option = _impl.GetOption();
|
||||||
var annotationBuilder = _impl.GetAnnotationBuilder();
|
var annotationBuilder = _impl.GetAnnotationBuilder();
|
||||||
|
|
||||||
if ((option.flags & JumpLinkBuilderToolOptions.DRAW_WALKABLE_BORDER) != 0)
|
if ((option.flags & JumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER) != 0)
|
||||||
{
|
{
|
||||||
if (annotationBuilder != null)
|
if (annotationBuilder != null)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ public class JumpLinkBuilderTool : IRcTool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((option.flags & JumpLinkBuilderToolOptions.DRAW_ANNOTATIONS) != 0)
|
if ((option.flags & JumpLinkBuilderToolOption.DRAW_ANNOTATIONS) != 0)
|
||||||
{
|
{
|
||||||
dd.Begin(QUADS);
|
dd.Begin(QUADS);
|
||||||
foreach (JumpLink link in _impl.GetLinks())
|
foreach (JumpLink link in _impl.GetLinks())
|
||||||
|
@ -172,7 +172,7 @@ public class JumpLinkBuilderTool : IRcTool
|
||||||
{
|
{
|
||||||
foreach (JumpLink link in _impl.GetLinks())
|
foreach (JumpLink link in _impl.GetLinks())
|
||||||
{
|
{
|
||||||
if ((option.flags & JumpLinkBuilderToolOptions.DRAW_ANIM_TRAJECTORY) != 0)
|
if ((option.flags & JumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY) != 0)
|
||||||
{
|
{
|
||||||
float r = link.start.height;
|
float r = link.start.height;
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ public class JumpLinkBuilderTool : IRcTool
|
||||||
dd.End();
|
dd.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((option.flags & JumpLinkBuilderToolOptions.DRAW_LAND_SAMPLES) != 0)
|
if ((option.flags & JumpLinkBuilderToolOption.DRAW_LAND_SAMPLES) != 0)
|
||||||
{
|
{
|
||||||
dd.Begin(POINTS, 8.0f);
|
dd.Begin(POINTS, 8.0f);
|
||||||
for (int i = 0; i < link.start.gsamples.Length; ++i)
|
for (int i = 0; i < link.start.gsamples.Length; ++i)
|
||||||
|
@ -386,11 +386,11 @@ public class JumpLinkBuilderTool : IRcTool
|
||||||
ImGui.Text("Debug Draw Options");
|
ImGui.Text("Debug Draw Options");
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
//int newFlags = 0;
|
//int newFlags = 0;
|
||||||
ImGui.CheckboxFlags("Walkable Border", ref option.flags, JumpLinkBuilderToolOptions.DRAW_WALKABLE_BORDER);
|
ImGui.CheckboxFlags("Walkable Border", ref option.flags, JumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER);
|
||||||
ImGui.CheckboxFlags("Selected Edge", ref option.flags, JumpLinkBuilderToolOptions.DRAW_SELECTED_EDGE);
|
ImGui.CheckboxFlags("Selected Edge", ref option.flags, JumpLinkBuilderToolOption.DRAW_SELECTED_EDGE);
|
||||||
ImGui.CheckboxFlags("Anim Trajectory", ref option.flags, JumpLinkBuilderToolOptions.DRAW_ANIM_TRAJECTORY);
|
ImGui.CheckboxFlags("Anim Trajectory", ref option.flags, JumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY);
|
||||||
ImGui.CheckboxFlags("Land Samples", ref option.flags, JumpLinkBuilderToolOptions.DRAW_LAND_SAMPLES);
|
ImGui.CheckboxFlags("Land Samples", ref option.flags, JumpLinkBuilderToolOption.DRAW_LAND_SAMPLES);
|
||||||
ImGui.CheckboxFlags("All Annotations", ref option.flags, JumpLinkBuilderToolOptions.DRAW_ANNOTATIONS);
|
ImGui.CheckboxFlags("All Annotations", ref option.flags, JumpLinkBuilderToolOption.DRAW_ANNOTATIONS);
|
||||||
//option.flags = newFlags;
|
//option.flags = newFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class OffMeshConnectionTool : IRcTool
|
||||||
|
|
||||||
public void Layout()
|
public void Layout()
|
||||||
{
|
{
|
||||||
var options = _impl.GetOptions();
|
var options = _impl.GetOption();
|
||||||
ImGui.RadioButton("One Way", ref options.bidir, 0);
|
ImGui.RadioButton("One Way", ref options.bidir, 0);
|
||||||
ImGui.RadioButton("Bidirectional", ref options.bidir, 1);
|
ImGui.RadioButton("Bidirectional", ref options.bidir, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,12 @@ namespace DotRecast.Recast.DemoTool.Tools
|
||||||
private readonly List<JumpLink> _links;
|
private readonly List<JumpLink> _links;
|
||||||
private JumpLinkBuilder _annotationBuilder;
|
private JumpLinkBuilder _annotationBuilder;
|
||||||
private readonly int _selEdge = -1;
|
private readonly int _selEdge = -1;
|
||||||
private readonly JumpLinkBuilderToolOptions _option;
|
private readonly JumpLinkBuilderToolOption _option;
|
||||||
|
|
||||||
public JumpLinkBuilderToolImpl()
|
public JumpLinkBuilderToolImpl()
|
||||||
{
|
{
|
||||||
_links = new List<JumpLink>();
|
_links = new List<JumpLink>();
|
||||||
_option = new JumpLinkBuilderToolOptions();
|
_option = new JumpLinkBuilderToolOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace DotRecast.Recast.DemoTool.Tools
|
||||||
_annotationBuilder = null;
|
_annotationBuilder = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JumpLinkBuilderToolOptions GetOption()
|
public JumpLinkBuilderToolOption GetOption()
|
||||||
{
|
{
|
||||||
return _option;
|
return _option;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ using DotRecast.Detour.Extras.Jumplink;
|
||||||
|
|
||||||
namespace DotRecast.Recast.DemoTool.Tools
|
namespace DotRecast.Recast.DemoTool.Tools
|
||||||
{
|
{
|
||||||
public class JumpLinkBuilderToolOptions
|
public class JumpLinkBuilderToolOption
|
||||||
{
|
{
|
||||||
public const int DRAW_WALKABLE_SURFACE = 1 << 0;
|
public const int DRAW_WALKABLE_SURFACE = 1 << 0;
|
||||||
public const int DRAW_WALKABLE_BORDER = 1 << 1;
|
public const int DRAW_WALKABLE_BORDER = 1 << 1;
|
|
@ -8,11 +8,11 @@ namespace DotRecast.Recast.DemoTool.Tools
|
||||||
public class OffMeshConnectionToolImpl : ISampleTool
|
public class OffMeshConnectionToolImpl : ISampleTool
|
||||||
{
|
{
|
||||||
private Sample _sample;
|
private Sample _sample;
|
||||||
private readonly OffMeshConnectionToolOptions _options;
|
private readonly OffMeshConnectionToolOption _option;
|
||||||
|
|
||||||
public OffMeshConnectionToolImpl()
|
public OffMeshConnectionToolImpl()
|
||||||
{
|
{
|
||||||
_options = new OffMeshConnectionToolOptions();
|
_option = new OffMeshConnectionToolOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetName()
|
public string GetName()
|
||||||
|
@ -31,9 +31,9 @@ namespace DotRecast.Recast.DemoTool.Tools
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public OffMeshConnectionToolOptions GetOptions()
|
public OffMeshConnectionToolOption GetOption()
|
||||||
{
|
{
|
||||||
return _options;
|
return _option;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(RcVec3f start, RcVec3f end)
|
public void Add(RcVec3f start, RcVec3f end)
|
||||||
|
@ -44,7 +44,7 @@ namespace DotRecast.Recast.DemoTool.Tools
|
||||||
|
|
||||||
int area = SampleAreaModifications.SAMPLE_POLYAREA_TYPE_JUMP;
|
int area = SampleAreaModifications.SAMPLE_POLYAREA_TYPE_JUMP;
|
||||||
int flags = SampleAreaModifications.SAMPLE_POLYFLAGS_JUMP;
|
int flags = SampleAreaModifications.SAMPLE_POLYFLAGS_JUMP;
|
||||||
geom.AddOffMeshConnection(start, end, _sample.GetSettings().agentRadius, 0 == _options.bidir, area, flags);
|
geom.AddOffMeshConnection(start, end, _sample.GetSettings().agentRadius, 0 == _option.bidir, area, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Remove(RcVec3f p)
|
public void Remove(RcVec3f p)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace DotRecast.Recast.DemoTool.Tools
|
namespace DotRecast.Recast.DemoTool.Tools
|
||||||
{
|
{
|
||||||
public class OffMeshConnectionToolOptions
|
public class OffMeshConnectionToolOption
|
||||||
{
|
{
|
||||||
public int bidir;
|
public int bidir;
|
||||||
}
|
}
|
Loading…
Reference in New Issue