From c2e954b70afa09be63f94d72491b5daa2315ab00 Mon Sep 17 00:00:00 2001 From: ikpil Date: Sun, 20 Aug 2023 13:19:47 +0900 Subject: [PATCH] typo for unity3d --- src/DotRecast.Recast.Demo/DemoSample.cs | 10 +++--- src/DotRecast.Recast.Demo/RecastDemo.cs | 36 +++++++++---------- ...eDemoTool.cs => ConvexVolumeSampleTool.cs} | 6 ++-- .../{CrowdDemoTool.cs => CrowdSampleTool.cs} | 6 ++-- ...DemoTool.cs => DynamicUpdateSampleTool.cs} | 6 ++-- .../Tools/{IRcDemoTool.cs => ISampleTool.cs} | 2 +- ...moTool.cs => JumpLinkBuilderSampleTool.cs} | 6 ++-- ...tacleDemoTool.cs => ObstacleSampleTool.cs} | 6 ++-- ...Tool.cs => OffMeshConnectionSampleTool.cs} | 6 ++-- ...shDemoTool.cs => TestNavmeshSampleTool.cs} | 6 ++-- .../{TileDemoTool.cs => TileSampleTool.cs} | 6 ++-- src/DotRecast.Recast.Demo/UI/RcToolsetView.cs | 16 ++++----- 12 files changed, 56 insertions(+), 56 deletions(-) rename src/DotRecast.Recast.Demo/Tools/{ConvexVolumeDemoTool.cs => ConvexVolumeSampleTool.cs} (98%) rename src/DotRecast.Recast.Demo/Tools/{CrowdDemoTool.cs => CrowdSampleTool.cs} (99%) rename src/DotRecast.Recast.Demo/Tools/{DynamicUpdateDemoTool.cs => DynamicUpdateSampleTool.cs} (99%) rename src/DotRecast.Recast.Demo/Tools/{IRcDemoTool.cs => ISampleTool.cs} (97%) rename src/DotRecast.Recast.Demo/Tools/{JumpLinkBuilderDemoTool.cs => JumpLinkBuilderSampleTool.cs} (99%) rename src/DotRecast.Recast.Demo/Tools/{ObstacleDemoTool.cs => ObstacleSampleTool.cs} (93%) rename src/DotRecast.Recast.Demo/Tools/{OffMeshConnectionDemoTool.cs => OffMeshConnectionSampleTool.cs} (96%) rename src/DotRecast.Recast.Demo/Tools/{TestNavmeshDemoTool.cs => TestNavmeshSampleTool.cs} (99%) rename src/DotRecast.Recast.Demo/Tools/{TileDemoTool.cs => TileSampleTool.cs} (97%) diff --git a/src/DotRecast.Recast.Demo/DemoSample.cs b/src/DotRecast.Recast.Demo/DemoSample.cs index 18c4ecb..0c0bf1d 100644 --- a/src/DotRecast.Recast.Demo/DemoSample.cs +++ b/src/DotRecast.Recast.Demo/DemoSample.cs @@ -28,16 +28,16 @@ namespace DotRecast.Recast.Demo { public class DemoSample { - private DemoInputGeomProvider _inputGeom; + private DemoInputGeomProvider _geom; private DtNavMesh _navMesh; private DtNavMeshQuery _navMeshQuery; private readonly RcNavMeshBuildSettings _settings; private IList _recastResults; private bool _changed; - public DemoSample(DemoInputGeomProvider inputGeom, IList recastResults, DtNavMesh navMesh) + public DemoSample(DemoInputGeomProvider geom, IList recastResults, DtNavMesh navMesh) { - _inputGeom = inputGeom; + _geom = geom; _recastResults = recastResults; _navMesh = navMesh; _settings = new RcNavMeshBuildSettings(); @@ -53,7 +53,7 @@ namespace DotRecast.Recast.Demo public DemoInputGeomProvider GetInputGeom() { - return _inputGeom; + return _geom; } public IList GetRecastResults() @@ -88,7 +88,7 @@ namespace DotRecast.Recast.Demo public void Update(DemoInputGeomProvider geom, IList recastResults, DtNavMesh navMesh) { - _inputGeom = geom; + _geom = geom; _recastResults = recastResults; _navMesh = navMesh; SetQuery(navMesh); diff --git a/src/DotRecast.Recast.Demo/RecastDemo.cs b/src/DotRecast.Recast.Demo/RecastDemo.cs index 8f23bd5..5f89248 100644 --- a/src/DotRecast.Recast.Demo/RecastDemo.cs +++ b/src/DotRecast.Recast.Demo/RecastDemo.cs @@ -381,14 +381,14 @@ public class RecastDemo : IRecastDemoChannel settingsView.SetSample(_sample); toolset = new RcToolsetView( - new TestNavmeshDemoTool(), - new TileDemoTool(), - new ObstacleDemoTool(), - new OffMeshConnectionDemoTool(), - new ConvexVolumeDemoTool(), - new CrowdDemoTool(), - new JumpLinkBuilderDemoTool(), - new DynamicUpdateDemoTool() + new TestNavmeshSampleTool(), + new TileSampleTool(), + new ObstacleSampleTool(), + new OffMeshConnectionSampleTool(), + new ConvexVolumeSampleTool(), + new CrowdSampleTool(), + new JumpLinkBuilderSampleTool(), + new DynamicUpdateSampleTool() ); toolset.SetEnabled(true); logView = new RcLogView(); @@ -610,10 +610,10 @@ public class RecastDemo : IRecastDemoChannel dd.Fog(camr * 0.1f, camr * 1.25f); renderer.Render(_sample, settingsView.GetDrawMode()); - IRcDemoTool demoTool = toolset.GetTool(); - if (demoTool != null) + ISampleTool sampleTool = toolset.GetTool(); + if (sampleTool != null) { - demoTool.HandleRender(renderer); + sampleTool.HandleRender(renderer); } dd.Fog(false); @@ -788,12 +788,12 @@ public class RecastDemo : IRecastDemoChannel } RcVec3f rayDir = RcVec3f.Of(rayEnd.x - rayStart.x, rayEnd.y - rayStart.y, rayEnd.z - rayStart.z); - IRcDemoTool rayDemoTool = toolset.GetTool(); + ISampleTool raySampleTool = toolset.GetTool(); rayDir.Normalize(); - if (rayDemoTool != null) + if (raySampleTool != null) { - Logger.Information($"click ray - tool({rayDemoTool.GetTool().GetName()}) rayStart({rayStart.x:0.#},{rayStart.y:0.#},{rayStart.z:0.#}) pos({rayDir.x:0.#},{rayDir.y:0.#},{rayDir.z:0.#}) shift({processHitTestShift})"); - rayDemoTool.HandleClickRay(rayStart, rayDir, processHitTestShift); + Logger.Information($"click ray - tool({raySampleTool.GetTool().GetName()}) rayStart({rayStart.x:0.#},{rayStart.y:0.#},{rayStart.z:0.#}) pos({rayDir.x:0.#},{rayDir.y:0.#},{rayDir.z:0.#}) shift({processHitTestShift})"); + raySampleTool.HandleClickRay(rayStart, rayDir, processHitTestShift); } if (hit) @@ -812,10 +812,10 @@ public class RecastDemo : IRecastDemoChannel pos.x = rayStart.x + (rayEnd.x - rayStart.x) * hitTime; pos.y = rayStart.y + (rayEnd.y - rayStart.y) * hitTime; pos.z = rayStart.z + (rayEnd.z - rayStart.z) * hitTime; - if (rayDemoTool != null) + if (raySampleTool != null) { - Logger.Information($"click - tool({rayDemoTool.GetTool().GetName()}) rayStart({rayStart.x:0.#},{rayStart.y:0.#},{rayStart.z:0.#}) pos({pos.x:0.#},{pos.y:0.#},{pos.z:0.#}) shift({processHitTestShift})"); - rayDemoTool.HandleClick(rayStart, pos, processHitTestShift); + Logger.Information($"click - tool({raySampleTool.GetTool().GetName()}) rayStart({rayStart.x:0.#},{rayStart.y:0.#},{rayStart.z:0.#}) pos({pos.x:0.#},{pos.y:0.#},{pos.z:0.#}) shift({processHitTestShift})"); + raySampleTool.HandleClick(rayStart, pos, processHitTestShift); } } } diff --git a/src/DotRecast.Recast.Demo/Tools/ConvexVolumeDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs similarity index 98% rename from src/DotRecast.Recast.Demo/Tools/ConvexVolumeDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs index 22a67cc..f93e39c 100644 --- a/src/DotRecast.Recast.Demo/Tools/ConvexVolumeDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/ConvexVolumeSampleTool.cs @@ -34,9 +34,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives; namespace DotRecast.Recast.Demo.Tools; -public class ConvexVolumeDemoTool : IRcDemoTool +public class ConvexVolumeSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; private readonly ConvexVolumeToolImpl _impl; @@ -49,7 +49,7 @@ public class ConvexVolumeDemoTool : IRcDemoTool private readonly List pts = new(); private readonly List hull = new(); - public ConvexVolumeDemoTool() + public ConvexVolumeSampleTool() { _impl = new ConvexVolumeToolImpl(); } diff --git a/src/DotRecast.Recast.Demo/Tools/CrowdDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs similarity index 99% rename from src/DotRecast.Recast.Demo/Tools/CrowdDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs index 91ad343..5e77811 100644 --- a/src/DotRecast.Recast.Demo/Tools/CrowdDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/CrowdSampleTool.cs @@ -35,9 +35,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives; namespace DotRecast.Recast.Demo.Tools; -public class CrowdDemoTool : IRcDemoTool +public class CrowdSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; private readonly CrowdToolImpl _impl; @@ -54,7 +54,7 @@ public class CrowdDemoTool : IRcDemoTool private int m_modeIdx = CrowdToolMode.CREATE.Idx; private long crowdUpdateTime; - public CrowdDemoTool() + public CrowdSampleTool() { m_agentDebug.vod = new DtObstacleAvoidanceDebugData(2048); profilingTool = new CrowdProfilingTool(GetAgentParams); diff --git a/src/DotRecast.Recast.Demo/Tools/DynamicUpdateDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs similarity index 99% rename from src/DotRecast.Recast.Demo/Tools/DynamicUpdateDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs index a2b239c..1dc5b0f 100644 --- a/src/DotRecast.Recast.Demo/Tools/DynamicUpdateDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/DynamicUpdateSampleTool.cs @@ -40,9 +40,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives; namespace DotRecast.Recast.Demo.Tools; -public class DynamicUpdateDemoTool : IRcDemoTool +public class DynamicUpdateSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; private readonly DynamicUpdateToolImpl _impl; @@ -89,7 +89,7 @@ public class DynamicUpdateDemoTool : IRcDemoTool private bool raycastHit; private RcVec3f raycastHitPos; - public DynamicUpdateDemoTool() + public DynamicUpdateSampleTool() { _impl = new(); executor = Task.Factory; diff --git a/src/DotRecast.Recast.Demo/Tools/IRcDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/ISampleTool.cs similarity index 97% rename from src/DotRecast.Recast.Demo/Tools/IRcDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/ISampleTool.cs index d1a4354..30fb866 100644 --- a/src/DotRecast.Recast.Demo/Tools/IRcDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/ISampleTool.cs @@ -24,7 +24,7 @@ using DotRecast.Recast.Toolset; namespace DotRecast.Recast.Demo.Tools; -public interface IRcDemoTool +public interface ISampleTool { void SetSample(DemoSample sample); void OnSampleChanged(); diff --git a/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs similarity index 99% rename from src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs index cd4c1b8..d706d8a 100644 --- a/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs @@ -28,15 +28,15 @@ using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives; namespace DotRecast.Recast.Demo.Tools; -public class JumpLinkBuilderDemoTool : IRcDemoTool +public class JumpLinkBuilderSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; private readonly JumpLinkBuilderToolImpl _impl; private readonly JumpLinkBuilderToolOption _option; - public JumpLinkBuilderDemoTool() + public JumpLinkBuilderSampleTool() { _impl = new(); _option = new(); diff --git a/src/DotRecast.Recast.Demo/Tools/ObstacleDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs similarity index 93% rename from src/DotRecast.Recast.Demo/Tools/ObstacleDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs index 41a7ce4..40527e7 100644 --- a/src/DotRecast.Recast.Demo/Tools/ObstacleDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/ObstacleSampleTool.cs @@ -8,9 +8,9 @@ using Serilog; namespace DotRecast.Recast.Demo.Tools; -public class ObstacleDemoTool : IRcDemoTool +public class ObstacleSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; @@ -18,7 +18,7 @@ public class ObstacleDemoTool : IRcDemoTool private bool _hitPosSet; private RcVec3f _hitPos; - public ObstacleDemoTool() + public ObstacleSampleTool() { _impl = new(DtTileCacheCompressorFactory.Shared); } diff --git a/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs similarity index 96% rename from src/DotRecast.Recast.Demo/Tools/OffMeshConnectionDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs index b8312e7..2e02a73 100644 --- a/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/OffMeshConnectionSampleTool.cs @@ -30,9 +30,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDraw; namespace DotRecast.Recast.Demo.Tools; -public class OffMeshConnectionDemoTool : IRcDemoTool +public class OffMeshConnectionSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; @@ -40,7 +40,7 @@ public class OffMeshConnectionDemoTool : IRcDemoTool private bool hitPosSet; private RcVec3f hitPos; - public OffMeshConnectionDemoTool() + public OffMeshConnectionSampleTool() { _impl = new(); } diff --git a/src/DotRecast.Recast.Demo/Tools/TestNavmeshDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs similarity index 99% rename from src/DotRecast.Recast.Demo/Tools/TestNavmeshDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs index 34c2fa7..36729e0 100644 --- a/src/DotRecast.Recast.Demo/Tools/TestNavmeshDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TestNavmeshSampleTool.cs @@ -13,9 +13,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives; namespace DotRecast.Recast.Demo.Tools; -public class TestNavmeshDemoTool : IRcDemoTool +public class TestNavmeshSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private const int MAX_POLYS = 256; @@ -47,7 +47,7 @@ public class TestNavmeshDemoTool : IRcDemoTool private DtStatus m_pathFindStatus = DtStatus.DT_FAILURE; private readonly List randomPoints = new(); - public TestNavmeshDemoTool() + public TestNavmeshSampleTool() { _impl = new(); m_filter = new DtQueryDefaultFilter( diff --git a/src/DotRecast.Recast.Demo/Tools/TileDemoTool.cs b/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs similarity index 97% rename from src/DotRecast.Recast.Demo/Tools/TileDemoTool.cs rename to src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs index 6df140a..9c04f3f 100644 --- a/src/DotRecast.Recast.Demo/Tools/TileDemoTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TileSampleTool.cs @@ -10,9 +10,9 @@ using static DotRecast.Recast.Demo.Draw.DebugDraw; namespace DotRecast.Recast.Demo.Tools; -public class TileDemoTool : IRcDemoTool +public class TileSampleTool : ISampleTool { - private static readonly ILogger Logger = Log.ForContext(); + private static readonly ILogger Logger = Log.ForContext(); private DemoSample _sample; private readonly TileToolImpl _impl; @@ -20,7 +20,7 @@ public class TileDemoTool : IRcDemoTool private bool _hitPosSet; private RcVec3f _hitPos; - public TileDemoTool() + public TileSampleTool() { _impl = new(); } diff --git a/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs b/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs index 5adc33c..367fc6b 100644 --- a/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs +++ b/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs @@ -31,15 +31,15 @@ public class RcToolsetView : IRcView { //private readonly NkColor white = NkColor.Create(); private int _currentToolIdx = 0; - private IRcDemoTool _currentDemoTool; + private ISampleTool _currentSampleTool; private bool enabled; - private readonly IRcDemoTool[] tools; + private readonly ISampleTool[] tools; private bool _isHovered; public bool IsHovered() => _isHovered; private RcCanvas _canvas; - public RcToolsetView(params IRcDemoTool[] tools) + public RcToolsetView(params ISampleTool[] tools) { this.tools = tools; } @@ -82,10 +82,10 @@ public class RcToolsetView : IRcView return; } - _currentDemoTool = tools[_currentToolIdx]; - ImGui.Text(_currentDemoTool.GetTool().GetName()); + _currentSampleTool = tools[_currentToolIdx]; + ImGui.Text(_currentSampleTool.GetTool().GetName()); ImGui.Separator(); - _currentDemoTool.Layout(); + _currentSampleTool.Layout(); ImGui.End(); } @@ -95,9 +95,9 @@ public class RcToolsetView : IRcView this.enabled = enabled; } - public IRcDemoTool GetTool() + public ISampleTool GetTool() { - return _currentDemoTool; + return _currentSampleTool; } public void SetSample(DemoSample sample)