From e98ff8bec7b2d5967e1c8b6fd8dc9805aa97e77c Mon Sep 17 00:00:00 2001 From: ikpil Date: Sun, 20 Aug 2023 13:45:44 +0900 Subject: [PATCH] rename for unity3d --- .../Tools/ConvexVolumeSampleTool.cs | 6 +- .../Tools/CrowdSampleTool.cs | 2 +- .../Tools/DynamicUpdateSampleTool.cs | 2 +- .../Tools/JumpLinkBuilderSampleTool.cs | 22 +++---- .../Tools/ObstacleSampleTool.cs | 2 +- .../Tools/OffMeshConnectionSampleTool.cs | 2 +- .../Tools/TestNavmeshSampleTool.cs | 62 +++++++++---------- .../Tools/TileSampleTool.cs | 2 +- ...olumeToolImpl.cs => RcConvexVolumeTool.cs} | 2 +- .../{CrowdToolImpl.cs => RcCrowdTool.cs} | 2 +- ...dateToolImpl.cs => RcDynamicUpdateTool.cs} | 2 +- ...erToolImpl.cs => RcJumpLinkBuilderTool.cs} | 5 +- ...tion.cs => RcJumpLinkBuilderToolOption.cs} | 2 +- ...{ObstacleToolImpl.cs => RcObstacleTool.cs} | 4 +- ...ToolImpl.cs => RcOffMeshConnectionTool.cs} | 11 ++-- ...on.cs => RcOffMeshConnectionToolOption.cs} | 2 +- ...avmeshToolImpl.cs => RcTestNavMeshTool.cs} | 10 +-- .../Tools/RcTestNavmeshToolMode.cs | 39 ++++++++++++ ...olOption.cs => RcTestNavmeshToolOption.cs} | 6 +- .../Tools/{TileToolImpl.cs => RcTileTool.cs} | 2 +- .../Tools/TestNavmeshToolMode.cs | 39 ------------ 21 files changed, 112 insertions(+), 114 deletions(-) rename src/DotRecast.Recast.Toolset/Tools/{ConvexVolumeToolImpl.cs => RcConvexVolumeTool.cs} (98%) rename src/DotRecast.Recast.Toolset/Tools/{CrowdToolImpl.cs => RcCrowdTool.cs} (75%) rename src/DotRecast.Recast.Toolset/Tools/{DynamicUpdateToolImpl.cs => RcDynamicUpdateTool.cs} (73%) rename src/DotRecast.Recast.Toolset/Tools/{JumpLinkBuilderToolImpl.cs => RcJumpLinkBuilderTool.cs} (97%) rename src/DotRecast.Recast.Toolset/Tools/{JumpLinkBuilderToolOption.cs => RcJumpLinkBuilderToolOption.cs} (97%) rename src/DotRecast.Recast.Toolset/Tools/{ObstacleToolImpl.cs => RcObstacleTool.cs} (94%) rename src/DotRecast.Recast.Toolset/Tools/{OffMeshConnectionToolImpl.cs => RcOffMeshConnectionTool.cs} (83%) rename src/DotRecast.Recast.Toolset/Tools/{OffMeshConnectionToolOption.cs => RcOffMeshConnectionToolOption.cs} (63%) rename src/DotRecast.Recast.Toolset/Tools/{TestNavmeshToolImpl.cs => RcTestNavMeshTool.cs} (97%) create mode 100644 src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolMode.cs rename src/DotRecast.Recast.Toolset/Tools/{TestNavmeshToolOption.cs => RcTestNavmeshToolOption.cs} (64%) rename src/DotRecast.Recast.Toolset/Tools/{TileToolImpl.cs => RcTileTool.cs} (99%) delete mode 100644 src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolMode.cs diff --git a/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs index f93e39c..2e9796e 100644 --- a/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs @@ -39,7 +39,7 @@ public class ConvexVolumeSampleTool : ISampleTool private static readonly ILogger Logger = Log.ForContext(); 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); diff --git a/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs index 5e77811..2bd19f7 100644 --- a/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs @@ -40,7 +40,7 @@ public class CrowdSampleTool : ISampleTool private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; - private readonly CrowdToolImpl _impl; + private readonly RcCrowdTool _impl; private readonly CrowdToolParams toolParams = new CrowdToolParams(); private DtNavMesh m_nav; private DtCrowd crowd; diff --git a/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs index 1dc5b0f..def6241 100644 --- a/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs @@ -45,7 +45,7 @@ public class DynamicUpdateSampleTool : ISampleTool private static readonly ILogger Logger = Log.ForContext(); 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; diff --git a/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs index d706d8a..295e5fe 100644 --- a/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs @@ -33,8 +33,8 @@ public class JumpLinkBuilderSampleTool : ISampleTool private static readonly ILogger Logger = Log.ForContext(); 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; } diff --git a/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs index 40527e7..75b4cb1 100644 --- a/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs @@ -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; diff --git a/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs index 2e02a73..c4ca238 100644 --- a/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs @@ -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; diff --git a/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs index 36729e0..8fdcca2 100644 --- a/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs @@ -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()) diff --git a/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs b/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs index 9c04f3f..aa2d109 100644 --- a/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs @@ -15,7 +15,7 @@ public class TileSampleTool : ISampleTool private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; - private readonly TileToolImpl _impl; + private readonly RcTileTool _impl; private bool _hitPosSet; private RcVec3f _hitPos; diff --git a/src/DotRecast.Recast.Toolset/Tools/ConvexVolumeToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcConvexVolumeTool.cs similarity index 98% rename from src/DotRecast.Recast.Toolset/Tools/ConvexVolumeToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcConvexVolumeTool.cs index 54a2e38..1cc96aa 100644 --- a/src/DotRecast.Recast.Toolset/Tools/ConvexVolumeToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcConvexVolumeTool.cs @@ -5,7 +5,7 @@ using DotRecast.Recast.Geom; namespace DotRecast.Recast.Toolset.Tools { - public class ConvexVolumeToolImpl : IRcToolable + public class RcConvexVolumeTool : IRcToolable { public string GetName() { diff --git a/src/DotRecast.Recast.Toolset/Tools/CrowdToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcCrowdTool.cs similarity index 75% rename from src/DotRecast.Recast.Toolset/Tools/CrowdToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcCrowdTool.cs index 1ede56b..b63efb7 100644 --- a/src/DotRecast.Recast.Toolset/Tools/CrowdToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcCrowdTool.cs @@ -1,6 +1,6 @@ namespace DotRecast.Recast.Toolset.Tools { - public class CrowdToolImpl : IRcToolable + public class RcCrowdTool : IRcToolable { public string GetName() { diff --git a/src/DotRecast.Recast.Toolset/Tools/DynamicUpdateToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcDynamicUpdateTool.cs similarity index 73% rename from src/DotRecast.Recast.Toolset/Tools/DynamicUpdateToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcDynamicUpdateTool.cs index c4d21ba..82aca10 100644 --- a/src/DotRecast.Recast.Toolset/Tools/DynamicUpdateToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcDynamicUpdateTool.cs @@ -1,6 +1,6 @@ namespace DotRecast.Recast.Toolset.Tools { - public class DynamicUpdateToolImpl : IRcToolable + public class RcDynamicUpdateTool : IRcToolable { public string GetName() { diff --git a/src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderTool.cs similarity index 97% rename from src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderTool.cs index 1f8f5c6..1cfd6cd 100644 --- a/src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderTool.cs @@ -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 _links; private JumpLinkBuilder _annotationBuilder; private readonly int _selEdge = -1; - public JumpLinkBuilderToolImpl() + public RcJumpLinkBuilderTool() { _links = new List(); } diff --git a/src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolOption.cs b/src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderToolOption.cs similarity index 97% rename from src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolOption.cs rename to src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderToolOption.cs index 9fa1c2e..fa06a79 100644 --- a/src/DotRecast.Recast.Toolset/Tools/JumpLinkBuilderToolOption.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcJumpLinkBuilderToolOption.cs @@ -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; diff --git a/src/DotRecast.Recast.Toolset/Tools/ObstacleToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcObstacleTool.cs similarity index 94% rename from src/DotRecast.Recast.Toolset/Tools/ObstacleToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcObstacleTool.cs index 230bf2b..4fe32ac 100644 --- a/src/DotRecast.Recast.Toolset/Tools/ObstacleToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcObstacleTool.cs @@ -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(); diff --git a/src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionTool.cs similarity index 83% rename from src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionTool.cs index 6e15da2..b0234ac 100644 --- a/src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionTool.cs @@ -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; } diff --git a/src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolOption.cs b/src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionToolOption.cs similarity index 63% rename from src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolOption.cs rename to src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionToolOption.cs index fb077ee..8fe0ba3 100644 --- a/src/DotRecast.Recast.Toolset/Tools/OffMeshConnectionToolOption.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcOffMeshConnectionToolOption.cs @@ -1,6 +1,6 @@ namespace DotRecast.Recast.Toolset.Tools { - public class OffMeshConnectionToolOption + public class RcOffMeshConnectionToolOption { public int bidir; } diff --git a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs similarity index 97% rename from src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs index e32397b..05b661d 100644 --- a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs @@ -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; } diff --git a/src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolMode.cs b/src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolMode.cs new file mode 100644 index 0000000..188b6e3 --- /dev/null +++ b/src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolMode.cs @@ -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 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; + } + } +} \ No newline at end of file diff --git a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolOption.cs b/src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolOption.cs similarity index 64% rename from src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolOption.cs rename to src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolOption.cs index 172a9ae..b29a546 100644 --- a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolOption.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcTestNavmeshToolOption.cs @@ -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; diff --git a/src/DotRecast.Recast.Toolset/Tools/TileToolImpl.cs b/src/DotRecast.Recast.Toolset/Tools/RcTileTool.cs similarity index 99% rename from src/DotRecast.Recast.Toolset/Tools/TileToolImpl.cs rename to src/DotRecast.Recast.Toolset/Tools/RcTileTool.cs index 8b692d8..7be1264 100644 --- a/src/DotRecast.Recast.Toolset/Tools/TileToolImpl.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcTileTool.cs @@ -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() { diff --git a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolMode.cs b/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolMode.cs deleted file mode 100644 index 57cc8eb..0000000 --- a/src/DotRecast.Recast.Toolset/Tools/TestNavmeshToolMode.cs +++ /dev/null @@ -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 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; - } - } -} \ No newline at end of file