forked from bit/DotRecastNetSim
rename for unity3d
This commit is contained in:
parent
503b063d84
commit
e98ff8bec7
|
@ -39,7 +39,7 @@ public class ConvexVolumeSampleTool : ISampleTool
|
|||
private static readonly ILogger Logger = Log.ForContext<ConvexVolumeSampleTool>();
|
||||
|
||||
private DemoSample _sample;
|
||||
private readonly ConvexVolumeToolImpl _impl;
|
||||
private readonly RcConvexVolumeTool _impl;
|
||||
|
||||
private int areaTypeValue = SampleAreaModifications.SAMPLE_AREAMOD_GRASS.Value;
|
||||
private RcAreaModification areaType = SampleAreaModifications.SAMPLE_AREAMOD_GRASS;
|
||||
|
@ -51,7 +51,7 @@ public class ConvexVolumeSampleTool : ISampleTool
|
|||
|
||||
public ConvexVolumeSampleTool()
|
||||
{
|
||||
_impl = new ConvexVolumeToolImpl();
|
||||
_impl = new RcConvexVolumeTool();
|
||||
}
|
||||
|
||||
public IRcToolable GetTool()
|
||||
|
@ -87,7 +87,7 @@ public class ConvexVolumeSampleTool : ISampleTool
|
|||
// If clicked on that last pt, create the shape.
|
||||
if (pts.Count > 0 && RcVec3f.DistSqr(p, pts[pts.Count - 1]) < 0.2f * 0.2f)
|
||||
{
|
||||
var vol = ConvexVolumeToolImpl.CreateConvexVolume(pts, hull, areaType, boxDescent, boxHeight, polyOffset);
|
||||
var vol = RcConvexVolumeTool.CreateConvexVolume(pts, hull, areaType, boxDescent, boxHeight, polyOffset);
|
||||
if (null != vol)
|
||||
{
|
||||
_impl.Add(geom, vol);
|
||||
|
|
|
@ -40,7 +40,7 @@ public class CrowdSampleTool : ISampleTool
|
|||
private static readonly ILogger Logger = Log.ForContext<CrowdSampleTool>();
|
||||
|
||||
private DemoSample _sample;
|
||||
private readonly CrowdToolImpl _impl;
|
||||
private readonly RcCrowdTool _impl;
|
||||
private readonly CrowdToolParams toolParams = new CrowdToolParams();
|
||||
private DtNavMesh m_nav;
|
||||
private DtCrowd crowd;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class DynamicUpdateSampleTool : ISampleTool
|
|||
private static readonly ILogger Logger = Log.ForContext<DynamicUpdateSampleTool>();
|
||||
|
||||
private DemoSample _sample;
|
||||
private readonly DynamicUpdateToolImpl _impl;
|
||||
private readonly RcDynamicUpdateTool _impl;
|
||||
private int toolModeIdx = DynamicUpdateToolMode.BUILD.Idx;
|
||||
private DynamicUpdateToolMode mode = DynamicUpdateToolMode.BUILD;
|
||||
private float cellSize = 0.3f;
|
||||
|
|
|
@ -33,8 +33,8 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
private static readonly ILogger Logger = Log.ForContext<JumpLinkBuilderSampleTool>();
|
||||
private DemoSample _sample;
|
||||
|
||||
private readonly JumpLinkBuilderToolImpl _impl;
|
||||
private readonly JumpLinkBuilderToolOption _option;
|
||||
private readonly RcJumpLinkBuilderTool _impl;
|
||||
private readonly RcJumpLinkBuilderToolOption _option;
|
||||
|
||||
public JumpLinkBuilderSampleTool()
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
|
||||
var annotationBuilder = _impl.GetAnnotationBuilder();
|
||||
|
||||
if ((_option.flags & JumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER) != 0)
|
||||
if ((_option.flags & RcJumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER) != 0)
|
||||
{
|
||||
if (annotationBuilder != null)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
|
||||
if ((_option.flags & JumpLinkBuilderToolOption.DRAW_ANNOTATIONS) != 0)
|
||||
if ((_option.flags & RcJumpLinkBuilderToolOption.DRAW_ANNOTATIONS) != 0)
|
||||
{
|
||||
dd.Begin(QUADS);
|
||||
foreach (JumpLink link in _impl.GetLinks())
|
||||
|
@ -180,7 +180,7 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
{
|
||||
foreach (JumpLink link in _impl.GetLinks())
|
||||
{
|
||||
if ((_option.flags & JumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY) != 0)
|
||||
if ((_option.flags & RcJumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY) != 0)
|
||||
{
|
||||
float r = link.start.height;
|
||||
|
||||
|
@ -246,7 +246,7 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
dd.End();
|
||||
}
|
||||
|
||||
if ((_option.flags & JumpLinkBuilderToolOption.DRAW_LAND_SAMPLES) != 0)
|
||||
if ((_option.flags & RcJumpLinkBuilderToolOption.DRAW_LAND_SAMPLES) != 0)
|
||||
{
|
||||
dd.Begin(POINTS, 8.0f);
|
||||
for (int i = 0; i < link.start.gsamples.Length; ++i)
|
||||
|
@ -407,11 +407,11 @@ public class JumpLinkBuilderSampleTool : ISampleTool
|
|||
ImGui.Text("Debug Draw Options");
|
||||
ImGui.Separator();
|
||||
//int newFlags = 0;
|
||||
ImGui.CheckboxFlags("Walkable Border", ref _option.flags, JumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER);
|
||||
ImGui.CheckboxFlags("Selected Edge", ref _option.flags, JumpLinkBuilderToolOption.DRAW_SELECTED_EDGE);
|
||||
ImGui.CheckboxFlags("Anim Trajectory", ref _option.flags, JumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY);
|
||||
ImGui.CheckboxFlags("Land Samples", ref _option.flags, JumpLinkBuilderToolOption.DRAW_LAND_SAMPLES);
|
||||
ImGui.CheckboxFlags("All Annotations", ref _option.flags, JumpLinkBuilderToolOption.DRAW_ANNOTATIONS);
|
||||
ImGui.CheckboxFlags("Walkable Border", ref _option.flags, RcJumpLinkBuilderToolOption.DRAW_WALKABLE_BORDER);
|
||||
ImGui.CheckboxFlags("Selected Edge", ref _option.flags, RcJumpLinkBuilderToolOption.DRAW_SELECTED_EDGE);
|
||||
ImGui.CheckboxFlags("Anim Trajectory", ref _option.flags, RcJumpLinkBuilderToolOption.DRAW_ANIM_TRAJECTORY);
|
||||
ImGui.CheckboxFlags("Land Samples", ref _option.flags, RcJumpLinkBuilderToolOption.DRAW_LAND_SAMPLES);
|
||||
ImGui.CheckboxFlags("All Annotations", ref _option.flags, RcJumpLinkBuilderToolOption.DRAW_ANNOTATIONS);
|
||||
//option.flags = newFlags;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ObstacleSampleTool : ISampleTool
|
|||
|
||||
private DemoSample _sample;
|
||||
|
||||
private readonly ObstacleToolImpl _impl;
|
||||
private readonly RcObstacleTool _impl;
|
||||
private bool _hitPosSet;
|
||||
private RcVec3f _hitPos;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class OffMeshConnectionSampleTool : ISampleTool
|
|||
|
||||
private DemoSample _sample;
|
||||
|
||||
private readonly OffMeshConnectionToolImpl _impl;
|
||||
private readonly RcOffMeshConnectionTool _impl;
|
||||
private bool hitPosSet;
|
||||
private RcVec3f hitPos;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
private const int MAX_POLYS = 256;
|
||||
|
||||
private DemoSample _sample;
|
||||
private readonly TestNavmeshToolImpl _impl;
|
||||
private readonly RcTestNavMeshTool _impl;
|
||||
|
||||
private bool m_sposSet;
|
||||
private bool m_eposSet;
|
||||
|
@ -100,15 +100,15 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
|
||||
ImGui.Text("Mode");
|
||||
ImGui.Separator();
|
||||
ImGui.RadioButton(TestNavmeshToolMode.PATHFIND_FOLLOW.Label, ref option.modeIdx, TestNavmeshToolMode.PATHFIND_FOLLOW.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.PATHFIND_STRAIGHT.Label, ref option.modeIdx, TestNavmeshToolMode.PATHFIND_STRAIGHT.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.PATHFIND_SLICED.Label, ref option.modeIdx, TestNavmeshToolMode.PATHFIND_SLICED.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.DISTANCE_TO_WALL.Label, ref option.modeIdx, TestNavmeshToolMode.DISTANCE_TO_WALL.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.RAYCAST.Label, ref option.modeIdx, TestNavmeshToolMode.RAYCAST.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.FIND_POLYS_IN_CIRCLE.Label, ref option.modeIdx, TestNavmeshToolMode.FIND_POLYS_IN_CIRCLE.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.FIND_POLYS_IN_SHAPE.Label, ref option.modeIdx, TestNavmeshToolMode.FIND_POLYS_IN_SHAPE.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD.Label, ref option.modeIdx, TestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD.Idx);
|
||||
ImGui.RadioButton(TestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE.Label, ref option.modeIdx, TestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.PATHFIND_FOLLOW.Label, ref option.modeIdx, RcTestNavmeshToolMode.PATHFIND_FOLLOW.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.PATHFIND_STRAIGHT.Label, ref option.modeIdx, RcTestNavmeshToolMode.PATHFIND_STRAIGHT.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.PATHFIND_SLICED.Label, ref option.modeIdx, RcTestNavmeshToolMode.PATHFIND_SLICED.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.DISTANCE_TO_WALL.Label, ref option.modeIdx, RcTestNavmeshToolMode.DISTANCE_TO_WALL.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.RAYCAST.Label, ref option.modeIdx, RcTestNavmeshToolMode.RAYCAST.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.FIND_POLYS_IN_CIRCLE.Label, ref option.modeIdx, RcTestNavmeshToolMode.FIND_POLYS_IN_CIRCLE.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.FIND_POLYS_IN_SHAPE.Label, ref option.modeIdx, RcTestNavmeshToolMode.FIND_POLYS_IN_SHAPE.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD.Label, ref option.modeIdx, RcTestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD.Idx);
|
||||
ImGui.RadioButton(RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE.Label, ref option.modeIdx, RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE.Idx);
|
||||
ImGui.NewLine();
|
||||
|
||||
// selecting mode
|
||||
|
@ -116,11 +116,11 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
ImGui.Separator();
|
||||
ImGui.NewLine();
|
||||
|
||||
if (option.mode == TestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
if (option.mode == RcTestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
{
|
||||
}
|
||||
|
||||
if (option.mode == TestNavmeshToolMode.PATHFIND_STRAIGHT)
|
||||
if (option.mode == RcTestNavmeshToolMode.PATHFIND_STRAIGHT)
|
||||
{
|
||||
ImGui.Text("Vertices at crossings");
|
||||
ImGui.Separator();
|
||||
|
@ -129,7 +129,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
ImGui.RadioButton("All", ref option.straightPathOptions, DtNavMeshQuery.DT_STRAIGHTPATH_ALL_CROSSINGS);
|
||||
}
|
||||
|
||||
if (option.mode == TestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
if (option.mode == RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
{
|
||||
ImGui.Checkbox("Constrained", ref option.constrainByCircle);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
|
||||
var option = _impl.GetOption();
|
||||
|
||||
if (option.mode == TestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
if (option.mode == RcTestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
{
|
||||
if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0)
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
m_smoothPath = null;
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.PATHFIND_STRAIGHT)
|
||||
else if (option.mode == RcTestNavmeshToolMode.PATHFIND_STRAIGHT)
|
||||
{
|
||||
if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0)
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
m_straightPath = null;
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.PATHFIND_SLICED)
|
||||
else if (option.mode == RcTestNavmeshToolMode.PATHFIND_SLICED)
|
||||
{
|
||||
m_polys = null;
|
||||
m_straightPath = null;
|
||||
|
@ -251,7 +251,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
m_pathFindStatus = _impl.InitSlicedFindPath(navQuery, m_startRef, m_endRef, m_spos, m_epos, m_filter, option.enableRaycast);
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.RAYCAST)
|
||||
else if (option.mode == RcTestNavmeshToolMode.RAYCAST)
|
||||
{
|
||||
m_straightPath = null;
|
||||
if (m_sposSet && m_eposSet && m_startRef != 0)
|
||||
|
@ -271,7 +271,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.DISTANCE_TO_WALL)
|
||||
else if (option.mode == RcTestNavmeshToolMode.DISTANCE_TO_WALL)
|
||||
{
|
||||
m_distanceToWall = 0;
|
||||
if (m_sposSet && m_startRef != 0)
|
||||
|
@ -285,7 +285,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_POLYS_IN_CIRCLE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_POLYS_IN_CIRCLE)
|
||||
{
|
||||
if (m_sposSet && m_startRef != 0 && m_eposSet)
|
||||
{
|
||||
|
@ -300,7 +300,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_POLYS_IN_SHAPE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_POLYS_IN_SHAPE)
|
||||
{
|
||||
if (m_sposSet && m_startRef != 0 && m_eposSet)
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD)
|
||||
{
|
||||
if (m_sposSet && m_startRef != 0)
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
{
|
||||
randomPoints.Clear();
|
||||
if (m_sposSet && m_startRef != 0 && m_eposSet)
|
||||
|
@ -374,7 +374,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
|
||||
var option = _impl.GetOption();
|
||||
if (option.mode == TestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
if (option.mode == RcTestNavmeshToolMode.PATHFIND_FOLLOW)
|
||||
{
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_startRef, startCol);
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_endRef, endCol);
|
||||
|
@ -440,7 +440,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
*/
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.PATHFIND_STRAIGHT || option.mode == TestNavmeshToolMode.PATHFIND_SLICED)
|
||||
else if (option.mode == RcTestNavmeshToolMode.PATHFIND_STRAIGHT || option.mode == RcTestNavmeshToolMode.PATHFIND_SLICED)
|
||||
{
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_startRef, startCol);
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_endRef, endCol);
|
||||
|
@ -510,7 +510,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
dd.DepthMask(true);
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.RAYCAST)
|
||||
else if (option.mode == RcTestNavmeshToolMode.RAYCAST)
|
||||
{
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_startRef, startCol);
|
||||
|
||||
|
@ -562,7 +562,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
dd.DepthMask(true);
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.DISTANCE_TO_WALL)
|
||||
else if (option.mode == RcTestNavmeshToolMode.DISTANCE_TO_WALL)
|
||||
{
|
||||
dd.DebugDrawNavMeshPoly(m_navMesh, m_startRef, startCol);
|
||||
dd.DepthMask(false);
|
||||
|
@ -582,7 +582,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
|
||||
dd.DepthMask(true);
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_POLYS_IN_CIRCLE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_POLYS_IN_CIRCLE)
|
||||
{
|
||||
if (m_polys != null)
|
||||
{
|
||||
|
@ -615,7 +615,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
dd.DepthMask(true);
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_POLYS_IN_SHAPE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_POLYS_IN_SHAPE)
|
||||
{
|
||||
if (m_polys != null)
|
||||
{
|
||||
|
@ -652,7 +652,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
dd.DepthMask(true);
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD)
|
||||
else if (option.mode == RcTestNavmeshToolMode.FIND_LOCAL_NEIGHBOURHOOD)
|
||||
{
|
||||
if (m_polys != null)
|
||||
{
|
||||
|
@ -739,7 +739,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (option.mode == TestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
else if (option.mode == RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||
{
|
||||
dd.DepthMask(false);
|
||||
dd.Begin(POINTS, 4.0f);
|
||||
|
@ -792,7 +792,7 @@ public class TestNavmeshSampleTool : ISampleTool
|
|||
{
|
||||
// TODO Auto-generated method stub
|
||||
var option = _impl.GetOption();
|
||||
if (option.mode == TestNavmeshToolMode.PATHFIND_SLICED)
|
||||
if (option.mode == RcTestNavmeshToolMode.PATHFIND_SLICED)
|
||||
{
|
||||
DtNavMeshQuery m_navQuery = _sample.GetNavMeshQuery();
|
||||
if (m_pathFindStatus.InProgress())
|
||||
|
|
|
@ -15,7 +15,7 @@ public class TileSampleTool : ISampleTool
|
|||
private static readonly ILogger Logger = Log.ForContext<TileSampleTool>();
|
||||
|
||||
private DemoSample _sample;
|
||||
private readonly TileToolImpl _impl;
|
||||
private readonly RcTileTool _impl;
|
||||
|
||||
private bool _hitPosSet;
|
||||
private RcVec3f _hitPos;
|
||||
|
|
|
@ -5,7 +5,7 @@ using DotRecast.Recast.Geom;
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class ConvexVolumeToolImpl : IRcToolable
|
||||
public class RcConvexVolumeTool : IRcToolable
|
||||
{
|
||||
public string GetName()
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class CrowdToolImpl : IRcToolable
|
||||
public class RcCrowdTool : IRcToolable
|
||||
{
|
||||
public string GetName()
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class DynamicUpdateToolImpl : IRcToolable
|
||||
public class RcDynamicUpdateTool : IRcToolable
|
||||
{
|
||||
public string GetName()
|
||||
{
|
|
@ -3,17 +3,16 @@ using DotRecast.Core;
|
|||
using DotRecast.Detour.Extras.Jumplink;
|
||||
using DotRecast.Recast.Geom;
|
||||
using DotRecast.Recast.Toolset.Builder;
|
||||
using DotRecast.Recast.Toolset.Geom;
|
||||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class JumpLinkBuilderToolImpl : IRcToolable
|
||||
public class RcJumpLinkBuilderTool : IRcToolable
|
||||
{
|
||||
private readonly List<JumpLink> _links;
|
||||
private JumpLinkBuilder _annotationBuilder;
|
||||
private readonly int _selEdge = -1;
|
||||
|
||||
public JumpLinkBuilderToolImpl()
|
||||
public RcJumpLinkBuilderTool()
|
||||
{
|
||||
_links = new List<JumpLink>();
|
||||
}
|
|
@ -20,7 +20,7 @@ using DotRecast.Detour.Extras.Jumplink;
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class JumpLinkBuilderToolOption
|
||||
public class RcJumpLinkBuilderToolOption
|
||||
{
|
||||
public const int DRAW_WALKABLE_SURFACE = 1 << 0;
|
||||
public const int DRAW_WALKABLE_BORDER = 1 << 1;
|
|
@ -7,13 +7,13 @@ using DotRecast.Recast.Toolset.Geom;
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class ObstacleToolImpl : IRcToolable
|
||||
public class RcObstacleTool : IRcToolable
|
||||
{
|
||||
private readonly IDtTileCacheCompressorFactory _compFactory;
|
||||
private readonly IDtTileCacheMeshProcess _proc;
|
||||
private DtTileCache _tc;
|
||||
|
||||
public ObstacleToolImpl(IDtTileCacheCompressorFactory compFactory, IDtTileCacheMeshProcess meshProcessor = null)
|
||||
public RcObstacleTool(IDtTileCacheCompressorFactory compFactory, IDtTileCacheMeshProcess meshProcessor = null)
|
||||
{
|
||||
_compFactory = compFactory;
|
||||
_proc = meshProcessor ?? new DemoDtTileCacheMeshProcess();
|
|
@ -2,17 +2,16 @@
|
|||
using DotRecast.Core;
|
||||
using DotRecast.Recast.Geom;
|
||||
using DotRecast.Recast.Toolset.Builder;
|
||||
using DotRecast.Recast.Toolset.Geom;
|
||||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class OffMeshConnectionToolImpl : IRcToolable
|
||||
public class RcOffMeshConnectionTool : IRcToolable
|
||||
{
|
||||
private readonly OffMeshConnectionToolOption _option;
|
||||
private readonly RcOffMeshConnectionToolOption _option;
|
||||
|
||||
public OffMeshConnectionToolImpl()
|
||||
public RcOffMeshConnectionTool()
|
||||
{
|
||||
_option = new OffMeshConnectionToolOption();
|
||||
_option = new RcOffMeshConnectionToolOption();
|
||||
}
|
||||
|
||||
public string GetName()
|
||||
|
@ -20,7 +19,7 @@ namespace DotRecast.Recast.Toolset.Tools
|
|||
return "Create Off-Mesh Links";
|
||||
}
|
||||
|
||||
public OffMeshConnectionToolOption GetOption()
|
||||
public RcOffMeshConnectionToolOption GetOption()
|
||||
{
|
||||
return _option;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class OffMeshConnectionToolOption
|
||||
public class RcOffMeshConnectionToolOption
|
||||
{
|
||||
public int bidir;
|
||||
}
|
|
@ -5,16 +5,16 @@ using DotRecast.Detour;
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class TestNavmeshToolImpl : IRcToolable
|
||||
public class RcTestNavMeshTool : IRcToolable
|
||||
{
|
||||
public const int MAX_POLYS = 256;
|
||||
public const int MAX_SMOOTH = 2048;
|
||||
|
||||
private readonly TestNavmeshToolOption _option;
|
||||
private readonly RcTestNavmeshToolOption _option;
|
||||
|
||||
public TestNavmeshToolImpl()
|
||||
public RcTestNavMeshTool()
|
||||
{
|
||||
_option = new TestNavmeshToolOption();
|
||||
_option = new RcTestNavmeshToolOption();
|
||||
}
|
||||
|
||||
public string GetName()
|
||||
|
@ -22,7 +22,7 @@ namespace DotRecast.Recast.Toolset.Tools
|
|||
return "Test Navmesh";
|
||||
}
|
||||
|
||||
public TestNavmeshToolOption GetOption()
|
||||
public RcTestNavmeshToolOption GetOption()
|
||||
{
|
||||
return _option;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using DotRecast.Core;
|
||||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class RcTestNavmeshToolMode
|
||||
{
|
||||
public static readonly RcTestNavmeshToolMode PATHFIND_FOLLOW = new RcTestNavmeshToolMode(0, "Pathfind Follow");
|
||||
public static readonly RcTestNavmeshToolMode PATHFIND_STRAIGHT = new RcTestNavmeshToolMode(1, "Pathfind Straight");
|
||||
public static readonly RcTestNavmeshToolMode PATHFIND_SLICED = new RcTestNavmeshToolMode(2, "Pathfind Sliced");
|
||||
public static readonly RcTestNavmeshToolMode DISTANCE_TO_WALL = new RcTestNavmeshToolMode(3, "Distance to Wall");
|
||||
public static readonly RcTestNavmeshToolMode RAYCAST = new RcTestNavmeshToolMode(4, "Raycast");
|
||||
public static readonly RcTestNavmeshToolMode FIND_POLYS_IN_CIRCLE = new RcTestNavmeshToolMode(5, "Find Polys in Circle");
|
||||
public static readonly RcTestNavmeshToolMode FIND_POLYS_IN_SHAPE = new RcTestNavmeshToolMode(6, "Find Polys in Shape");
|
||||
public static readonly RcTestNavmeshToolMode FIND_LOCAL_NEIGHBOURHOOD = new RcTestNavmeshToolMode(7, "Find Local Neighbourhood");
|
||||
public static readonly RcTestNavmeshToolMode RANDOM_POINTS_IN_CIRCLE = new RcTestNavmeshToolMode(8, "Random Points in Circle");
|
||||
|
||||
public static readonly RcImmutableArray<RcTestNavmeshToolMode> Values = RcImmutableArray.Create(
|
||||
PATHFIND_FOLLOW,
|
||||
PATHFIND_STRAIGHT,
|
||||
PATHFIND_SLICED,
|
||||
DISTANCE_TO_WALL,
|
||||
RAYCAST,
|
||||
FIND_POLYS_IN_CIRCLE,
|
||||
FIND_POLYS_IN_SHAPE,
|
||||
FIND_LOCAL_NEIGHBOURHOOD,
|
||||
RANDOM_POINTS_IN_CIRCLE
|
||||
);
|
||||
|
||||
|
||||
public int Idx { get; }
|
||||
public string Label { get; }
|
||||
|
||||
private RcTestNavmeshToolMode(int idx, string label)
|
||||
{
|
||||
Idx = idx;
|
||||
Label = label;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class TestNavmeshToolOption
|
||||
public class RcTestNavmeshToolOption
|
||||
{
|
||||
public int modeIdx = TestNavmeshToolMode.PATHFIND_FOLLOW.Idx;
|
||||
public TestNavmeshToolMode mode => TestNavmeshToolMode.Values[modeIdx];
|
||||
public int modeIdx = RcTestNavmeshToolMode.PATHFIND_FOLLOW.Idx;
|
||||
public RcTestNavmeshToolMode mode => RcTestNavmeshToolMode.Values[modeIdx];
|
||||
|
||||
public int straightPathOptions;
|
||||
public bool constrainByCircle;
|
|
@ -6,7 +6,7 @@ using DotRecast.Recast.Toolset.Builder;
|
|||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class TileToolImpl : IRcToolable
|
||||
public class RcTileTool : IRcToolable
|
||||
{
|
||||
public string GetName()
|
||||
{
|
|
@ -1,39 +0,0 @@
|
|||
using DotRecast.Core;
|
||||
|
||||
namespace DotRecast.Recast.Toolset.Tools
|
||||
{
|
||||
public class TestNavmeshToolMode
|
||||
{
|
||||
public static readonly TestNavmeshToolMode PATHFIND_FOLLOW = new TestNavmeshToolMode(0, "Pathfind Follow");
|
||||
public static readonly TestNavmeshToolMode PATHFIND_STRAIGHT = new TestNavmeshToolMode(1, "Pathfind Straight");
|
||||
public static readonly TestNavmeshToolMode PATHFIND_SLICED = new TestNavmeshToolMode(2, "Pathfind Sliced");
|
||||
public static readonly TestNavmeshToolMode DISTANCE_TO_WALL = new TestNavmeshToolMode(3, "Distance to Wall");
|
||||
public static readonly TestNavmeshToolMode RAYCAST = new TestNavmeshToolMode(4, "Raycast");
|
||||
public static readonly TestNavmeshToolMode FIND_POLYS_IN_CIRCLE = new TestNavmeshToolMode(5, "Find Polys in Circle");
|
||||
public static readonly TestNavmeshToolMode FIND_POLYS_IN_SHAPE = new TestNavmeshToolMode(6, "Find Polys in Shape");
|
||||
public static readonly TestNavmeshToolMode FIND_LOCAL_NEIGHBOURHOOD = new TestNavmeshToolMode(7, "Find Local Neighbourhood");
|
||||
public static readonly TestNavmeshToolMode RANDOM_POINTS_IN_CIRCLE = new TestNavmeshToolMode(8, "Random Points in Circle");
|
||||
|
||||
public static readonly RcImmutableArray<TestNavmeshToolMode> Values = RcImmutableArray.Create(
|
||||
PATHFIND_FOLLOW,
|
||||
PATHFIND_STRAIGHT,
|
||||
PATHFIND_SLICED,
|
||||
DISTANCE_TO_WALL,
|
||||
RAYCAST,
|
||||
FIND_POLYS_IN_CIRCLE,
|
||||
FIND_POLYS_IN_SHAPE,
|
||||
FIND_LOCAL_NEIGHBOURHOOD,
|
||||
RANDOM_POINTS_IN_CIRCLE
|
||||
);
|
||||
|
||||
|
||||
public int Idx { get; }
|
||||
public string Label { get; }
|
||||
|
||||
private TestNavmeshToolMode(int idx, string label)
|
||||
{
|
||||
Idx = idx;
|
||||
Label = label;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue