From e3cad83e5535c8b1bb93f0565fe2e1775e95c273 Mon Sep 17 00:00:00 2001 From: ikpil Date: Wed, 2 Aug 2023 00:00:00 +0900 Subject: [PATCH] added RcMatrix4X4 --- src/DotRecast.Core/RcMatrix4X4.cs | 22 +++++++++++++++++++++ src/DotRecast.Detour.Dynamic/DynamicTile.cs | 2 +- src/DotRecast.Recast.Demo/RecastDemo.cs | 4 +--- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 src/DotRecast.Core/RcMatrix4X4.cs diff --git a/src/DotRecast.Core/RcMatrix4X4.cs b/src/DotRecast.Core/RcMatrix4X4.cs new file mode 100644 index 0000000..ac5c291 --- /dev/null +++ b/src/DotRecast.Core/RcMatrix4X4.cs @@ -0,0 +1,22 @@ +namespace DotRecast.Core +{ + public struct RcMatrix4X4 + { + public float m11; + public float m12; + public float m13; + public float m14; + public float m21; + public float m22; + public float m23; + public float m24; + public float m31; + public float m32; + public float m33; + public float m34; + public float m41; + public float m42; + public float m43; + public float m44; + } +} \ No newline at end of file diff --git a/src/DotRecast.Detour.Dynamic/DynamicTile.cs b/src/DotRecast.Detour.Dynamic/DynamicTile.cs index ab1c069..8ad460e 100644 --- a/src/DotRecast.Detour.Dynamic/DynamicTile.cs +++ b/src/DotRecast.Detour.Dynamic/DynamicTile.cs @@ -33,7 +33,7 @@ namespace DotRecast.Detour.Dynamic public readonly VoxelTile voxelTile; public DynamicTileCheckpoint checkpoint; public RecastBuilderResult recastResult; - DtMeshData meshData; + private DtMeshData meshData; private readonly ConcurrentDictionary colliders = new ConcurrentDictionary(); private bool dirty = true; private long id; diff --git a/src/DotRecast.Recast.Demo/RecastDemo.cs b/src/DotRecast.Recast.Demo/RecastDemo.cs index 56bd94d..a67228c 100644 --- a/src/DotRecast.Recast.Demo/RecastDemo.cs +++ b/src/DotRecast.Recast.Demo/RecastDemo.cs @@ -530,9 +530,7 @@ public class RecastDemo : IRecastDemoChannel } else if (_sample.GetNavMesh() != null) { - RcVec3f[] bounds = NavMeshUtils.GetNavMeshBounds(_sample.GetNavMesh()); - bminN = bounds[0]; - bmaxN = bounds[1]; + _sample.GetNavMesh().ComputeBounds(out bminN, out bmaxN); hasBound = true; } else if (0 < _sample.GetRecastResults().Count)