forked from bit/DotRecastNetSim
move StatusEx
This commit is contained in:
parent
c70d2ebfd4
commit
f22ae12d1e
|
@ -24,8 +24,6 @@ using DotRecast.Core;
|
|||
|
||||
namespace DotRecast.Detour.Crowd
|
||||
{
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
/// Represents an agent managed by a #dtCrowd object.
|
||||
/// @ingroup crowd
|
||||
public class CrowdAgent
|
||||
|
|
|
@ -18,7 +18,6 @@ freely, subject to the following restrictions:
|
|||
|
||||
using System.Collections.Generic;
|
||||
using DotRecast.Recast;
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
namespace DotRecast.Detour.Dynamic
|
||||
{
|
||||
|
|
|
@ -21,8 +21,6 @@ using DotRecast.Core;
|
|||
|
||||
namespace DotRecast.Detour
|
||||
{
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
/**
|
||||
* Convex-convex intersection based on "Computational Geometry in C" by Joseph O'Rourke
|
||||
*/
|
||||
|
|
|
@ -4,8 +4,6 @@ using DotRecast.Detour.QueryResults;
|
|||
|
||||
namespace DotRecast.Detour
|
||||
{
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
public class FindNearestPolyQuery : IPolyQuery
|
||||
{
|
||||
private readonly NavMeshQuery query;
|
||||
|
|
|
@ -21,7 +21,6 @@ using DotRecast.Core;
|
|||
|
||||
namespace DotRecast.Detour
|
||||
{
|
||||
|
||||
public interface IPolygonByCircleConstraint
|
||||
{
|
||||
float[] Aply(float[] polyVerts, RcVec3f circleCenter, float radius);
|
||||
|
|
|
@ -22,8 +22,6 @@ using DotRecast.Core;
|
|||
|
||||
namespace DotRecast.Detour
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class NodeQueue
|
||||
{
|
||||
private readonly RcSortedQueue<Node> m_heap = new RcSortedQueue<Node>((n1, n2) => n1.total.CompareTo(n2.total));
|
||||
|
|
|
@ -23,14 +23,14 @@ namespace DotRecast.Detour
|
|||
/** Defines a polygon within a MeshTile object. */
|
||||
public class Poly
|
||||
{
|
||||
public readonly int index;
|
||||
|
||||
/** The polygon is a standard convex polygon that is part of the surface of the mesh. */
|
||||
public const int DT_POLYTYPE_GROUND = 0;
|
||||
|
||||
/** The polygon is an off-mesh connection consisting of two vertices. */
|
||||
public const int DT_POLYTYPE_OFFMESH_CONNECTION = 1;
|
||||
|
||||
public readonly int index;
|
||||
|
||||
/** The indices of the polygon's vertices. The actual vertices are located in MeshTile::verts. */
|
||||
public readonly int[] verts;
|
||||
|
||||
|
|
|
@ -36,26 +36,5 @@ namespace DotRecast.Detour
|
|||
}
|
||||
}
|
||||
|
||||
public static class StatusEx
|
||||
{
|
||||
public static bool IsFailed(this Status @this)
|
||||
{
|
||||
return @this == Status.FAILURE || @this == Status.FAILURE_INVALID_PARAM;
|
||||
}
|
||||
|
||||
public static bool IsInProgress(this Status @this)
|
||||
{
|
||||
return @this == Status.IN_PROGRESS;
|
||||
}
|
||||
|
||||
public static bool IsSuccess(this Status @this)
|
||||
{
|
||||
return @this == Status.SUCCSESS || @this == Status.PARTIAL_RESULT;
|
||||
}
|
||||
|
||||
public static bool IsPartial(this Status @this)
|
||||
{
|
||||
return @this == Status.PARTIAL_RESULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
namespace DotRecast.Detour
|
||||
{
|
||||
public static class StatusEx
|
||||
{
|
||||
public static bool IsFailed(this Status @this)
|
||||
{
|
||||
return @this == Status.FAILURE || @this == Status.FAILURE_INVALID_PARAM;
|
||||
}
|
||||
|
||||
public static bool IsInProgress(this Status @this)
|
||||
{
|
||||
return @this == Status.IN_PROGRESS;
|
||||
}
|
||||
|
||||
public static bool IsSuccess(this Status @this)
|
||||
{
|
||||
return @this == Status.SUCCSESS || @this == Status.PARTIAL_RESULT;
|
||||
}
|
||||
|
||||
public static bool IsPartial(this Status @this)
|
||||
{
|
||||
return @this == Status.PARTIAL_RESULT;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -40,7 +40,6 @@ using Silk.NET.OpenAL;
|
|||
using Silk.NET.Windowing;
|
||||
using static DotRecast.Recast.Demo.Draw.DebugDraw;
|
||||
using static DotRecast.Recast.Demo.Draw.DebugDrawPrimitives;
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
namespace DotRecast.Recast.Demo.Tools;
|
||||
|
||||
|
|
Loading…
Reference in New Issue