diff --git a/src/DotRecast.Detour.TileCache/ObstacleRequest.cs b/src/DotRecast.Detour.TileCache/DtObstacleRequest.cs similarity index 86% rename from src/DotRecast.Detour.TileCache/ObstacleRequest.cs rename to src/DotRecast.Detour.TileCache/DtObstacleRequest.cs index 4051370..f26b289 100644 --- a/src/DotRecast.Detour.TileCache/ObstacleRequest.cs +++ b/src/DotRecast.Detour.TileCache/DtObstacleRequest.cs @@ -20,12 +20,12 @@ freely, subject to the following restrictions: namespace DotRecast.Detour.TileCache { - public readonly struct ObstacleRequest + public readonly struct DtObstacleRequest { - public readonly ObstacleRequestAction action; + public readonly DtObstacleRequestAction action; public readonly long refs; - public ObstacleRequest(ObstacleRequestAction action, long refs) + public DtObstacleRequest(DtObstacleRequestAction action, long refs) { this.action = action; this.refs = refs; diff --git a/src/DotRecast.Detour.TileCache/ObstacleRequestAction.cs b/src/DotRecast.Detour.TileCache/DtObstacleRequestAction.cs similarity index 96% rename from src/DotRecast.Detour.TileCache/ObstacleRequestAction.cs rename to src/DotRecast.Detour.TileCache/DtObstacleRequestAction.cs index 901abd5..92a1aba 100644 --- a/src/DotRecast.Detour.TileCache/ObstacleRequestAction.cs +++ b/src/DotRecast.Detour.TileCache/DtObstacleRequestAction.cs @@ -20,7 +20,7 @@ freely, subject to the following restrictions: namespace DotRecast.Detour.TileCache { - public enum ObstacleRequestAction + public enum DtObstacleRequestAction { REQUEST_ADD, REQUEST_REMOVE diff --git a/src/DotRecast.Detour.TileCache/DtTileCache.cs b/src/DotRecast.Detour.TileCache/DtTileCache.cs index f5c4f15..64346ce 100644 --- a/src/DotRecast.Detour.TileCache/DtTileCache.cs +++ b/src/DotRecast.Detour.TileCache/DtTileCache.cs @@ -47,7 +47,7 @@ namespace DotRecast.Detour.TileCache private readonly List m_obstacles = new List(); private DtTileCacheObstacle m_nextFreeObstacle; - private readonly List m_reqs = new List(); + private readonly List m_reqs = new List(); private readonly List m_update = new List(); private readonly DtTileCacheBuilder builder = new DtTileCacheBuilder(); @@ -348,7 +348,7 @@ namespace DotRecast.Detour.TileCache public long AddObstacle(RcVec3f pos, float radius, float height) { DtTileCacheObstacle ob = AllocObstacle(); - ob.type = TileCacheObstacleType.CYLINDER; + ob.type = DtTileCacheObstacleType.CYLINDER; ob.pos = pos; ob.radius = radius; @@ -361,7 +361,7 @@ namespace DotRecast.Detour.TileCache public long AddBoxObstacle(RcVec3f bmin, RcVec3f bmax) { DtTileCacheObstacle ob = AllocObstacle(); - ob.type = TileCacheObstacleType.BOX; + ob.type = DtTileCacheObstacleType.BOX; ob.bmin = bmin; ob.bmax = bmax; @@ -373,7 +373,7 @@ namespace DotRecast.Detour.TileCache public long AddBoxObstacle(RcVec3f center, RcVec3f extents, float yRadians) { DtTileCacheObstacle ob = AllocObstacle(); - ob.type = TileCacheObstacleType.ORIENTED_BOX; + ob.type = DtTileCacheObstacleType.ORIENTED_BOX; ob.center = center; ob.extents = extents; float coshalf = (float)Math.Cos(0.5f * yRadians); @@ -383,9 +383,9 @@ namespace DotRecast.Detour.TileCache return AddObstacleRequest(ob).refs; } - private ObstacleRequest AddObstacleRequest(DtTileCacheObstacle ob) + private DtObstacleRequest AddObstacleRequest(DtTileCacheObstacle ob) { - ObstacleRequest req = new ObstacleRequest(ObstacleRequestAction.REQUEST_ADD, GetObstacleRef(ob)); + DtObstacleRequest req = new DtObstacleRequest(DtObstacleRequestAction.REQUEST_ADD, GetObstacleRef(ob)); m_reqs.Add(req); return req; } @@ -397,7 +397,7 @@ namespace DotRecast.Detour.TileCache return; } - ObstacleRequest req = new ObstacleRequest(ObstacleRequestAction.REQUEST_REMOVE, refs); + DtObstacleRequest req = new DtObstacleRequest(DtObstacleRequestAction.REQUEST_REMOVE, refs); m_reqs.Add(req); } @@ -479,7 +479,7 @@ namespace DotRecast.Detour.TileCache if (0 == m_update.Count) { // Process requests. - foreach (ObstacleRequest req in m_reqs) + foreach (DtObstacleRequest req in m_reqs) { int idx = DecodeObstacleIdObstacle(req.refs); if (idx >= m_obstacles.Count) @@ -494,7 +494,7 @@ namespace DotRecast.Detour.TileCache continue; } - if (req.action == ObstacleRequestAction.REQUEST_ADD) + if (req.action == DtObstacleRequestAction.REQUEST_ADD) { // Find touched tiles. RcVec3f bmin = new RcVec3f(); @@ -513,7 +513,7 @@ namespace DotRecast.Detour.TileCache ob.pending.Add(j); } } - else if (req.action == ObstacleRequestAction.REQUEST_REMOVE) + else if (req.action == DtObstacleRequestAction.REQUEST_REMOVE) { // Prepare to remove obstacle. ob.state = DtObstacleState.DT_OBSTACLE_REMOVING; @@ -612,15 +612,15 @@ namespace DotRecast.Detour.TileCache if (Contains(ob.touched, refs)) { - if (ob.type == TileCacheObstacleType.CYLINDER) + if (ob.type == DtTileCacheObstacleType.CYLINDER) { builder.MarkCylinderArea(layer, tile.header.bmin, m_params.cs, m_params.ch, ob.pos, ob.radius, ob.height, 0); } - else if (ob.type == TileCacheObstacleType.BOX) + else if (ob.type == DtTileCacheObstacleType.BOX) { builder.MarkBoxArea(layer, tile.header.bmin, m_params.cs, m_params.ch, ob.bmin, ob.bmax, 0); } - else if (ob.type == TileCacheObstacleType.ORIENTED_BOX) + else if (ob.type == DtTileCacheObstacleType.ORIENTED_BOX) { builder.MarkBoxArea(layer, tile.header.bmin, m_params.cs, m_params.ch, ob.center, ob.extents, ob.rotAux, 0); } @@ -692,7 +692,7 @@ namespace DotRecast.Detour.TileCache public void GetObstacleBounds(DtTileCacheObstacle ob, ref RcVec3f bmin, ref RcVec3f bmax) { - if (ob.type == TileCacheObstacleType.CYLINDER) + if (ob.type == DtTileCacheObstacleType.CYLINDER) { bmin.x = ob.pos.x - ob.radius; bmin.y = ob.pos.y; @@ -701,12 +701,12 @@ namespace DotRecast.Detour.TileCache bmax.y = ob.pos.y + ob.height; bmax.z = ob.pos.z + ob.radius; } - else if (ob.type == TileCacheObstacleType.BOX) + else if (ob.type == DtTileCacheObstacleType.BOX) { bmin = ob.bmin; bmax = ob.bmax; } - else if (ob.type == TileCacheObstacleType.ORIENTED_BOX) + else if (ob.type == DtTileCacheObstacleType.ORIENTED_BOX) { float maxr = 1.41f * Math.Max(ob.extents.x, ob.extents.z); bmin.x = ob.center.x - maxr; diff --git a/src/DotRecast.Detour.TileCache/DtTileCacheObstacle.cs b/src/DotRecast.Detour.TileCache/DtTileCacheObstacle.cs index dca70e9..b236c8b 100644 --- a/src/DotRecast.Detour.TileCache/DtTileCacheObstacle.cs +++ b/src/DotRecast.Detour.TileCache/DtTileCacheObstacle.cs @@ -26,7 +26,7 @@ namespace DotRecast.Detour.TileCache public class DtTileCacheObstacle { public readonly int index; - public TileCacheObstacleType type; + public DtTileCacheObstacleType type; public RcVec3f pos = new RcVec3f(); public RcVec3f bmin = new RcVec3f(); public RcVec3f bmax = new RcVec3f(); diff --git a/src/DotRecast.Detour.TileCache/TileCacheObstacleType.cs b/src/DotRecast.Detour.TileCache/DtTileCacheObstacleType.cs similarity index 72% rename from src/DotRecast.Detour.TileCache/TileCacheObstacleType.cs rename to src/DotRecast.Detour.TileCache/DtTileCacheObstacleType.cs index a203655..622ef00 100644 --- a/src/DotRecast.Detour.TileCache/TileCacheObstacleType.cs +++ b/src/DotRecast.Detour.TileCache/DtTileCacheObstacleType.cs @@ -1,6 +1,6 @@ namespace DotRecast.Detour.TileCache { - public enum TileCacheObstacleType + public enum DtTileCacheObstacleType { CYLINDER, BOX,