rename for unity3d

This commit is contained in:
ikpil 2023-07-31 15:38:53 +09:00
parent 123640627a
commit 783ef97173
16 changed files with 17 additions and 18 deletions

View File

@ -51,7 +51,7 @@ namespace DotRecast.Detour.Dynamic
RecastBuilderResult r = BuildRecast(builder, config, voxelTile, heightfield, telemetry);
DtNavMeshCreateParams option = NavMeshCreateParams(voxelTile.tileX, voxelTile.tileZ, voxelTile.cellSize,
voxelTile.cellHeight, config, r);
meshData = NavMeshBuilder.CreateNavMeshData(option);
meshData = DtNavMeshBuilder.CreateNavMeshData(option);
return true;
}

View File

@ -57,7 +57,7 @@ namespace DotRecast.Detour.Extras
it.bmax[2] = Clamp((int)((bmax.z - data.header.bmin.z) * quantFactor), 0, 0x7fffffff);
}
return NavMeshBuilder.Subdivide(items, data.header.polyCount, 0, data.header.polyCount, 0, nodes);
return DtNavMeshBuilder.Subdivide(items, data.header.polyCount, 0, data.header.polyCount, 0, nodes);
}
}
}

View File

@ -38,7 +38,7 @@ namespace DotRecast.Detour.Extras.Jumplink
option.cs = r.GetMesh().cs;
option.ch = r.GetMesh().ch;
option.buildBvTree = true;
return new DtNavMeshQuery(new DtNavMesh(NavMeshBuilder.CreateNavMeshData(option), option.nvp, 0));
return new DtNavMeshQuery(new DtNavMesh(DtNavMeshBuilder.CreateNavMeshData(option), option.nvp, 0));
}

View File

@ -54,7 +54,7 @@ namespace DotRecast.Detour.Extras.Unity.Astar
connection.rad = 0.1f;
connection.side = startTile == endTile
? 0xFF
: NavMeshBuilder.ClassifyOffMeshPoint(RcVec3f.Of(connection.pos, 3), startTile.header.bmin, startTile.header.bmax);
: DtNavMeshBuilder.ClassifyOffMeshPoint(RcVec3f.Of(connection.pos, 3), startTile.header.bmin, startTile.header.bmax);
connection.userId = (int)l.linkID;
if (startTile.offMeshCons == null)
{

View File

@ -665,7 +665,7 @@ namespace DotRecast.Detour.TileCache
m_tmproc.Process(option);
}
DtMeshData meshData = NavMeshBuilder.CreateNavMeshData(option);
DtMeshData meshData = DtNavMeshBuilder.CreateNavMeshData(option);
// Remove existing tile.
m_navmesh.RemoveTile(m_navmesh.GetTileRefAt(tile.header.tx, tile.header.ty, tile.header.tlayer));
// Add new tile, or leave the location empty. if (navData) { // Let the

View File

@ -24,7 +24,7 @@ namespace DotRecast.Detour
{
public DtMeshData Build(DtNavMeshCreateParams option, int tileX, int tileY)
{
DtMeshData data = NavMeshBuilder.CreateNavMeshData(option);
DtMeshData data = DtNavMeshBuilder.CreateNavMeshData(option);
if (data != null)
{
data.header.x = tileX;

View File

@ -25,7 +25,7 @@ namespace DotRecast.Detour
{
using static DotRecast.Core.RcMath;
public static class NavMeshBuilder
public static class DtNavMeshBuilder
{
const int MESH_NULL_IDX = 0xffff;

View File

@ -24,7 +24,7 @@ namespace DotRecast.Detour
/**
* Simple helper to find an intersection between a ray and a nav mesh
*/
public static class NavMeshRaycast
public static class DtNavMeshRaycast
{
public static float? Raycast(DtNavMesh mesh, RcVec3f src, RcVec3f dst)
{

View File

@ -778,12 +778,12 @@ public class RecastDemo : IRecastDemoChannel
if (!hit.HasValue && _sample.GetNavMesh() != null)
{
hit = NavMeshRaycast.Raycast(_sample.GetNavMesh(), rayStart, rayEnd);
hit = DtNavMeshRaycast.Raycast(_sample.GetNavMesh(), rayStart, rayEnd);
}
if (!hit.HasValue && _sample.GetRecastResults() != null)
{
hit = PolyMeshRaycast.Raycast(_sample.GetRecastResults(), rayStart, rayEnd);
hit = RcPolyMeshRaycast.Raycast(_sample.GetRecastResults(), rayStart, rayEnd);
}
RcVec3f rayDir = RcVec3f.Of(rayEnd.x - rayStart.x, rayEnd.y - rayStart.y, rayEnd.z - rayStart.z);

View File

@ -83,7 +83,7 @@ namespace DotRecast.Recast.DemoTool.Builder
{
DtNavMeshCreateParams option = DemoNavMeshBuilder
.GetNavMeshCreateParams(geom, cellSize, cellHeight, agentHeight, agentRadius, agentMaxClimb, result);
var meshData = NavMeshBuilder.CreateNavMeshData(option);
var meshData = DtNavMeshBuilder.CreateNavMeshData(option);
if (null == meshData)
{
return null;

View File

@ -103,7 +103,7 @@ namespace DotRecast.Recast.DemoTool.Builder
option.tileX = x;
option.tileZ = z;
DtMeshData md = NavMeshBuilder.CreateNavMeshData(option);
DtMeshData md = DtNavMeshBuilder.CreateNavMeshData(option);
if (md != null)
{
meshData.Add(DemoNavMeshBuilder.UpdateAreaAndFlags(md));

View File

@ -21,7 +21,7 @@ using DotRecast.Core;
namespace DotRecast.Recast
{
public static class PolyMeshRaycast
public static class RcPolyMeshRaycast
{
public static float? Raycast(IList<RecastBuilderResult> results, RcVec3f src, RcVec3f dst)
{

View File

@ -41,8 +41,7 @@ namespace DotRecast.Recast
rectangle => IntersectSphere(rectangle, center, radius * radius));
}
public static void RasterizeCapsule(RcHeightfield hf, RcVec3f start, RcVec3f end, float radius, int area, int flagMergeThr,
RcTelemetry ctx)
public static void RasterizeCapsule(RcHeightfield hf, RcVec3f start, RcVec3f end, float radius, int area, int flagMergeThr, RcTelemetry ctx)
{
using var timer = ctx.ScopedTimer(RcTimerLabel.RC_TIMER_RASTERIZE_CAPSULE);
float[] bounds =

View File

@ -104,7 +104,7 @@ public class RecastTestMeshBuilder
option.offMeshConUserID = new int[1];
option.offMeshConUserID[0] = 0x4567;
option.offMeshConCount = 1;
meshData = NavMeshBuilder.CreateNavMeshData(option);
meshData = DtNavMeshBuilder.CreateNavMeshData(option);
}
public DtMeshData GetMeshData()

View File

@ -105,7 +105,7 @@ public class RecastTestMeshBuilder
option.offMeshConUserID = new int[1];
option.offMeshConUserID[0] = 0x4567;
option.offMeshConCount = 1;
meshData = NavMeshBuilder.CreateNavMeshData(option);
meshData = DtNavMeshBuilder.CreateNavMeshData(option);
}
public DtMeshData GetMeshData()

View File

@ -113,7 +113,7 @@ public class TestTiledNavMeshBuilder
option.tileX = result.tileX;
option.tileZ = result.tileZ;
option.buildBvTree = true;
navMesh.AddTile(NavMeshBuilder.CreateNavMeshData(option), 0, 0);
navMesh.AddTile(DtNavMeshBuilder.CreateNavMeshData(option), 0, 0);
}
}