From fd3a0201f8ea12d5ebb5edbb327b9559e7ef693d Mon Sep 17 00:00:00 2001 From: ikpil Date: Sat, 11 Nov 2023 12:43:32 +0900 Subject: [PATCH] rebase --- src/DotRecast.Detour.Extras/Unity/Astar/OffMeshLinkCreator.cs | 2 +- src/DotRecast.Detour/DtNavMesh.cs | 4 ++-- src/DotRecast.Detour/DtNavMeshRaycast.cs | 2 +- src/DotRecast.Detour/DtOffMeshConnection.cs | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/DotRecast.Detour.Extras/Unity/Astar/OffMeshLinkCreator.cs b/src/DotRecast.Detour.Extras/Unity/Astar/OffMeshLinkCreator.cs index ceb63a2..e87f7a6 100644 --- a/src/DotRecast.Detour.Extras/Unity/Astar/OffMeshLinkCreator.cs +++ b/src/DotRecast.Detour.Extras/Unity/Astar/OffMeshLinkCreator.cs @@ -49,7 +49,7 @@ namespace DotRecast.Detour.Extras.Unity.Astar startTile.header.vertCount += 2; DtOffMeshConnection connection = new DtOffMeshConnection(); connection.poly = poly; - connection.pos = new RcVec3f[] + connection.pos = new Vector3[] { l.clamped1, l.clamped2 }; diff --git a/src/DotRecast.Detour/DtNavMesh.cs b/src/DotRecast.Detour/DtNavMesh.cs index 0f8ebcc..736087b 100644 --- a/src/DotRecast.Detour/DtNavMesh.cs +++ b/src/DotRecast.Detour/DtNavMesh.cs @@ -856,7 +856,7 @@ namespace DotRecast.Detour }; // Find polygon to connect to. - RcVec3f p = targetCon.pos[1]; + Vector3 p = targetCon.pos[1]; var refs = FindNearestPolyInTile(tile, p, ext, out var nearestPt); if (refs == 0) { @@ -1093,7 +1093,7 @@ namespace DotRecast.Detour continue; } - RcVec3f[] p = con.pos; // First vertex + Vector3[] p = con.pos; // First vertex // findNearestPoly may return too optimistic results, further check // to make sure. if (RcMath.Sqr(nearestPt.X - p[0].X) + RcMath.Sqr(nearestPt.Z - p[0].Z) > RcMath.Sqr(con.rad)) diff --git a/src/DotRecast.Detour/DtNavMeshRaycast.cs b/src/DotRecast.Detour/DtNavMeshRaycast.cs index 6768cf3..4235231 100644 --- a/src/DotRecast.Detour/DtNavMeshRaycast.cs +++ b/src/DotRecast.Detour/DtNavMeshRaycast.cs @@ -59,7 +59,7 @@ namespace DotRecast.Detour ref DtPolyDetail pd = ref tile.data.detailMeshes[i]; - RcVec3f[] verts = new RcVec3f[3]; + Vector3[] verts = new Vector3[3]; for (int j = 0; j < pd.triCount; ++j) { int t = (pd.triBase + j) * 4; diff --git a/src/DotRecast.Detour/DtOffMeshConnection.cs b/src/DotRecast.Detour/DtOffMeshConnection.cs index 244f005..b18deb1 100644 --- a/src/DotRecast.Detour/DtOffMeshConnection.cs +++ b/src/DotRecast.Detour/DtOffMeshConnection.cs @@ -18,6 +18,7 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ +using System.Numerics; using DotRecast.Core.Numerics; namespace DotRecast.Detour @@ -27,7 +28,7 @@ namespace DotRecast.Detour public class DtOffMeshConnection { /// The endpoints of the connection. [(ax, ay, az, bx, by, bz)] - public RcVec3f[] pos = new RcVec3f[2]; + public Vector3[] pos = new Vector3[2]; /// The radius of the endpoints. [Limit: >= 0] public float rad;