Commit Graph

782 Commits

Author SHA1 Message Date
ikpil 1e0ef4f5cc SOH-2 - Span<float> pat = stackalloc float[(DT_MAX_PATTERN_DIVS * DT_MAX_PATTERN_RINGS + 1) * 2];
- https://github.com/ikpil/DotRecast/issues/41
2024-05-01 13:03:34 +09:00
ikpil 29fab9f5b2 soh-1 2024-04-30 00:13:52 +09:00
ikpil 3ae7582043 added RcSpans util 2024-04-27 11:08:55 +09:00
ikpil adbb265ca2 added T[] vs Span<T> benchmark 2024-04-27 11:00:32 +09:00
ikpil fb49a5bca6 checking ... 2024-04-27 10:58:47 +09:00
ikpil 97777511a7 Added the keepInterResults option to RcBuilder.Build()
- https://github.com/ikpil/DotRecast/issues/66
2024-04-25 01:18:04 +09:00
ikpil f22ec94038 support C# 10, 11 in DotRecast.Recast.Demo 2024-04-25 00:59:02 +09:00
ikpil bf6ee495d2 upgrade Silk.NET 2.20.0 -> 2.21.0 2024-04-24 23:40:11 +09:00
ikpil f49f9eb558 addedd AllocSpan/FreeSpan API 2024-04-22 23:57:13 +09:00
ikpil 6b2bd27b71 added RcSpanPool class 2024-04-22 23:52:01 +09:00
ikpil 50ea674cce used option `keepInterResults` to save memory
- https://github.com/ikpil/DotRecast/issues/66
- https://github.com/ikpil/DotRecast/issues/61
2024-04-20 12:59:34 +09:00
ikpil 8fe46a6450 Keep Itermediate Results in JumpLinkBuilderSampleTools 2024-04-18 00:10:06 +09:00
ikpil 80e07ebb3c Tick 'Keep Intermediate Results' option. 2024-04-17 23:50:48 +09:00
ikpil 97ffaf8700 add comment "Tick 'Keep Itermediate Results'" 2024-04-16 23:24:48 +09:00
ikpil 17c1c18372 added "Keep Itermediate Results" flag 2024-04-15 23:42:55 +09:00
ikpil 9210eb58fe changed to use `CompactHeightfield` instead of `Heightfield` when finding bmin/bmax 2024-04-14 00:43:03 +09:00
ikpil da82d6ba4d reduced usability of SolidHeightfield in recast build results 2024-04-13 12:53:58 +09:00
ikpil 26a1dfddeb fix bug where return value of dynamic update result is reversed 2024-04-13 12:43:54 +09:00
ikpil 668ebd0128 update comment 2024-04-12 02:27:07 +09:00
ikpil 402b25a436 fixed an issue where await deadlock could occur in various platform environments. 2024-04-12 00:08:06 +09:00
ikpil 7874b4403c Renamed RcBuilderResult class to C# style naming 2024-04-10 20:39:06 +09:00
ikpil 82027dffd7 Limiting the number of tasks during build 2024-04-10 19:52:58 +09:00
ikpil 573386c473 update library K4os.Compression.LZ4 1.3.8, NUnit.Analyzers 4.1.0, coverlet.collector 6.0.2 2024-03-22 23:12:55 +09:00
wreng b67ebeaec3 Added stackalloc where it's acceptable 2024-03-06 01:12:11 +09:00
Andrew Gilewsky 7dfac39408 Optimization: reduce number of allocations on hot path. 2024-03-06 01:09:32 +09:00
ikpil b81a5923a3 benchmark arrays 2024-02-24 20:36:33 +09:00
ikpil 3fbfb968d0 test RcRentedArray 2024-02-24 20:00:51 +09:00
ikpil 3c4723c907 added npath in MergeCorridor functions 2024-02-23 01:02:23 +09:00
ikpil 7836b78bb4 added DtCrowdConst.MAX_PATH_RESULT = 256 2024-02-23 00:52:23 +09:00
wreng 609508c94f Support split special case 2024-02-22 00:33:06 +09:00
wreng c47cc79552 CyclicBuffers SIMD 2024-02-22 00:33:06 +09:00
wreng fa837a84ed Replaced foreach with for to avoid enumerator allocations 2024-02-22 00:20:54 +09:00
ikpil 6034bfa28a Added struct RcScopedTimer to avoid allocations 2024-02-20 02:02:05 +09:00
ikpil c908daa8c3 RcCyclicBuffer<T> optimizations @wrenge 2024-02-20 01:53:50 +09:00
wreng 097a365528 CyclicBuffer optimizations 2024-02-20 01:17:34 +09:00
ikpil 804cb275a7 Added struct DtCrowdScopedTimer to avoid allocations in scoped timer calls @wrenge
- https://github.com/ikpil/DotRecast/pull/54
2024-02-20 01:10:54 +09:00
wreng 3158dfc29c Avoid allocation in ScopedTimer call 2024-02-20 00:52:31 +09:00
ikpil 01b3bcf771 added RcCylicBuffer<long> extensions 2024-02-19 00:36:44 +09:00
ikpil ad504fe217 Changed from List<T> to RcCyclicBuffer in DtCrowdTelemetry execution timing sampling @wrenge
- https://github.com/ikpil/DotRecast/issues/51
2024-02-18 00:43:29 +09:00
wreng a359686171 Replaced list with cyclic buffer 2024-02-18 00:43:29 +09:00
ikpil d0bec3714e added corridor maxpath for SOH issue
- https://github.com/ikpil/DotRecast/issues/41
2024-02-16 00:26:23 +09:00
ikpil 41ab26c03f rename _ext to _agentPlacementHalfExtents in DtCrowd 2024-02-15 00:36:58 +09:00
ikpil 742b7f7db8 reposition DT_CROWDAGENT_MAX_NEIGHBOURS, DT_CROWDAGENT_MAX_CORNERS 2024-02-15 00:25:55 +09:00
ikpil bd4825dcd5 reposition DtCrwdAgent class comment 2024-02-14 01:48:33 +09:00
ikpil aae0884f5a reposition MIN_TARGET_DIST 2024-02-14 01:40:43 +09:00
ikpil a5b3344c1f replace DtPathCorridor comment 2024-02-14 01:34:16 +09:00
ikpil f0eb976ba0 change index -> ptr 2024-02-13 13:53:43 +09:00
ikpil b26847d90f change GetNodeMap to AsEnumerable in DtNodePool 2024-02-13 13:53:43 +09:00
ikpil 3ce4f59002 rese DtNode in DtNodePool 2024-02-13 13:53:43 +09:00
ikpil 73bb475ef7 added menu bar in Demo 2024-02-11 15:39:34 +09:00
ikpil a65e5a3125 added DtNodeQueue unittest 2024-02-09 17:56:16 +09:00
ikpil 1db7fed92d fix: RcSortedQueue.Remove can not use binary-search 2024-02-08 00:22:32 +09:00
ikpil 45e4426df6 Changed RcSortedQueue.Remove() function to use binary search 2024-02-08 00:03:06 +09:00
ikpil 9ef3c4ba30 replace comment 2024-02-06 00:50:06 +09:00
ikpil af72cf3cc8 replace comment in DtNode 2024-02-05 13:56:39 +09:00
ikpil 0909818379 replace sampling time in CrowdAgentProfilingSampleTool 2024-02-04 21:20:36 +09:00
ikpil 2d3ca5b321 added WangHash for DtNodePool 2024-02-04 13:24:26 +09:00
ikpil 94ed3d646c typo 2024-02-04 12:42:34 +09:00
ikpil 2dc8593c78 Added avg, min, max, sampling updated times in CrowdAgentProfilingTool 2024-02-04 12:14:41 +09:00
ikpil 6b033ab058 add release note url in nuget package 2024-02-03 22:53:17 +09:00
ikpil bf83597c1e added DtNodePool.GetNode, FindNode, FindNodes tests 2024-02-02 00:29:58 +09:00
ikpil c61c2ba875 update package description 2024-02-01 22:47:12 +09:00
ikpil dbb03988f5 fix: DtRaycastHit SOH issue reslove 2024-02-01 13:59:22 +09:00
ikpil aaff85b229 fix: Change DtRaycastHit class to struct to resolve SOH issue. step2 2024-02-01 13:59:22 +09:00
ikpil 5bba84883e clean up comments in DtRaycastHit 2024-01-31 00:13:23 +09:00
ikpil 41df518a08 fix: SOH issue step1 (#41)
- https://github.com/ikpil/DotRecast/issues/41
2024-01-30 00:40:20 +09:00
ikpil 675ca8ea4b added RcRentedArray (#41) 2024-01-21 19:06:01 +09:00
ikpil 94ee6f9366 extended RcStackArray up to 512 elements (#41) 2024-01-21 13:05:08 +09:00
ikpil 07b50d9391 refactor: added RcStackArray4, RcStackArray8
- https://github.com/ikpil/DotRecast/issues/41
2024-01-21 13:05:08 +09:00
ikpil 17f13dd681 refactor: Remove unused List<int> overlaps in the MergeAndFilterLayerRegions function. 2024-01-20 00:57:09 +09:00
ikpil 66a3d73b8f refactor: add RcDirtyEntry 2024-01-19 00:08:01 +09:00
ikpil d7244bd0ff fix: invalid index 2024-01-18 23:39:32 +09:00
ikpil e0e31c19b9 refactor: int[3] -> RcLevelStackEntry 2024-01-18 23:39:32 +09:00
ikpil 78b29920cb add RcDirtyEntry, RcLevelStackEntry 2024-01-17 13:55:09 +09:00
ikpil af5b70d7f4 small refactoring 2024-01-13 22:06:06 +09:00
ikpil 4c8c596450 bugfix: creating convex volume with two points(#34)
- Issue reporter @adambennett55
- https://github.com/ikpil/DotRecast/issues/34
2024-01-12 01:46:52 +09:00
ikpil 9de4b1ee40 update comments 2024-01-11 13:54:46 +09:00
ikpil 87ef05feb8 refactor: BuildCompactHeightfield 2024-01-11 00:30:46 +09:00
ikpil 278fb6cc1b refactor: 2 step loop -> 1 step loop 2024-01-10 13:47:42 +09:00
ikpil 85c3cfdcf6 refactor: update comments 2024-01-10 01:20:03 +09:00
ikpil ebca91e64d rename DtLayerSweepSpan to RcLayerSweepSpan 2024-01-09 14:09:01 +09:00
ikpil f51f2479ba update comments 2024-01-08 14:08:07 +09:00
ikpil 2edabd3d44 rename RcTelemetry to RcContext 2024-01-07 13:00:38 +09:00
ikpil 648d7bd703 update comments 2024-01-07 12:53:28 +09:00
ikpil 507e3548ef refactor: aligned the parameter order of RasterizeTriangles() to match that of rcRasterizeTriangles() in the recastnavigation project. 2024-01-05 00:37:40 +09:00
ikpil 48a1e18101 refactor: made variable names identical to those in the DividePoly function of the recastnavigation project 2024-01-05 00:09:22 +09:00
ikpil cbdc670c6a refactor: align variable names to match those of the recastnavigation project. 2024-01-04 23:59:00 +09:00
ikpil 10bf4ce164 typo 2024-01-04 23:38:13 +09:00
ikpil be73850965 [Upstream] Cleanup filter code and improved documentation (https://github.com/recastnavigation/recastnavigation/pull/683)
- https://github.com/recastnavigation/recastnavigation/pull/683

This mostly just changes variable names and adds some comments to make the code more clear.

It also has a few small fixup changes to the unit tests.
2024-01-03 23:54:01 +09:00
ikpil 9d01b5243f Code cleanup and small optimizations in RecastFilter.cpp rcFilterLedgeSpans (https://github.com/recastnavigation/recastnavigation/pull/672)
- 3e94c3b6fc

* Code cleanup and minor refactor in RecastFilter.cpp rcFilterLedgeSpans

Because span.smax is always > 0, bot > 0 as well, and (-walkableClimb - bot) is always < -walkableClimb. Furthermore, as long as minNeighborHeight < -walkableClimb' at least once, there is no need to continue the traversal.

* Code cleanup and minor refactor in RecastFilter.cpp rcFilterLedgeSpans

Because span.smax is always > 0, bot > 0 as well, and (-walkableClimb - bot) is always < -walkableClimb. Furthermore, as long as minNeighborHeight < -walkableClimb' at least once, there is no need to continue the traversal.

* Update RecastFilter.cpp

Revise Comment
2024-01-01 14:11:28 +09:00
ikpil 2d36b5f639 fixed null mesh data in tiles. 2023-12-31 17:12:45 +09:00
ikpil 69c1e795df small refactoring static readonly 2023-12-30 16:17:42 +09:00
ikpil b341a41fae typo public property getter -> readonly 2023-12-29 21:07:44 +09:00
ikpil 19088d31f2 feat - Added UI scaling feature based on monitor resolution in Demo 2023-12-26 20:39:30 +09:00
c0nd3v b1db6df033 Fix typo 2023-12-23 11:14:00 +09:00
c0nd3v 9c7f34c521 Fix updated struct version 2023-12-23 11:11:48 +09:00
c0nd3v e782208faa Allow Radius 0 in Demo
Recast C++ demo allows radius 0 and I have a use case for it. I think it should be allowed
2023-12-23 11:04:28 +09:00
ikpil 6474f234a3 [Upstream] Make detail mesh edge detection more robust (recastnavigation #657)
- https://github.com/recastnavigation/recastnavigation/pull/657

Instead of using a distance check which can fail at large magnitudes due
to low precision we can check whether the edges are actually on the
hull.
2023-12-22 22:21:57 +09:00
ikpil fa8369f209 upgrade Silk.NET 2.19.0 -> 2.20.0 2023-12-13 23:37:07 +09:00
ikpil 19f5b05d6a fix: 'RANDOM_POINTS_IN_CIRCLE' mode where random points accumulate in RecastDemo 2023-12-06 00:52:09 +09:00
ikpil b24d6492a8 typo 2023-12-06 00:47:05 +09:00
ikpil d7676913d7 upgrade: Serilog.Sinks.Console 5.0.0 -> 5.0.1 2023-11-29 14:07:01 +09:00
ikpil 9c6ddfffe0 [Upstream] 248275e - Fix: typo error (#153)
- 248275e07f
2023-11-29 00:03:59 +09:00
Ikpil 7e472fae55
Pr/support net8 (#20)
* support net8
2023-11-16 14:05:19 +09:00
ikpil 43abc7d1e3 upgrade: silk.net 2.17.1 -> 2.19.0 2023-11-15 14:08:39 +09:00
ikpil cd509ad010 typo 2023-11-13 23:35:53 +09:00
ikpil 4c29fa0686 [Upstream] fix:rcBuildLayerRegions missing areaType (#470)
- ddaa361b08

It's already been modified, just align the code.
2023-11-13 23:35:43 +09:00
ikpil 8fcd8b5006 typo 2023-11-12 17:11:20 +09:00
ikpil 69c8c950d2 refactor: add type-safe array copy function 2023-11-11 13:08:52 +09:00
ikpil a50ba0b1b1 refactor: changed float[6] to RcVec3f[2] in DtOffMeshConnection class 2023-11-11 12:36:40 +09:00
ikpil 195c684fb2 upgrade: serilog 3.1.0 -> 3.1.1 2023-11-10 22:04:52 +09:00
ikpil 056408fed2 typo 2023-11-09 22:36:00 +09:00
ikpil b9ec4391f2 refactor: class NavMeshSetHeader -> struct NavMeshSetHeader 2023-11-09 22:19:43 +09:00
ikpil afabec2b7d upgrade: nuget 2023-11-09 22:11:35 +09:00
ikpil 54b04947de refactor: class NavMeshTileHeader -> struct NavMeshTileHeader 2023-11-09 22:09:27 +09:00
ikpil ac3f667bcc refactor: readonly struct DtPolyDetail 2023-11-09 21:57:38 +09:00
ikpil bb2041e253 refactor: added RcCompactSpanBuilder 2023-11-07 22:28:14 +09:00
ikpil 5aa482d35e refactor: readonly struct 2023-11-07 22:12:42 +09:00
ikpil 5b2e9591c2 refactor: use ref readonly RcCompactCell c = ref ... 2023-11-02 00:11:54 +09:00
ikpil 8f91328fd9 fix: fix bug where obstacle tile cache rebuild wasn't being reflected.
- https://github.com/ikpil/DotRecast/issues/14
2023-10-31 23:29:58 +09:00
ikpil 2245f70fcf refactor: revert this part due to a mix of C# and C++ style in array and interface usage 2023-10-31 23:06:42 +09:00
Gabriel Alexandre 99cbba7586 Migrated some small types to structs 2023-10-30 23:40:46 +09:00
ikpil ca019c19b3 refactor: support netstandard2.1 vector3 2023-10-28 13:39:05 +09:00
ikpil 0924b82f62 refactor: support .netstandard2.1 vector3 2023-10-28 13:22:02 +09:00
ikpil ffdbdb7ed8 refactor: support netstandard2.1 vector3 2023-10-28 13:04:06 +09:00
ikpil 26309e79f8 refactor: support net6.0 2023-10-28 12:30:49 +09:00
ikpil 5176ee036a refactor: support .netstandard2.1 vector3 2023-10-28 12:08:17 +09:00
ikpil 2e7a75624c refactor: vector3 2023-10-27 23:52:55 +09:00
ikpil 21b3cd6caa refactor: RcVec3f.Lerp 2023-10-27 00:03:03 +09:00
ikpil 93b6b52b8f refactor RcVec3f.IsFinite 2023-10-27 00:01:52 +09:00
ikpil 9a62fbf9f4 refactor: RcVec3f.Mad, IsFinite, Lerp 2023-10-26 00:05:00 +09:00
ikpil 18a195404f refactor: RcVec3f.Dist2D, Dist2DSqr, Perp2D 2023-10-25 23:50:54 +09:00
ikpil 7eba4e0c9d refactor: RcVec3f.Min/Max 2023-10-25 23:44:01 +09:00
ikpil 28ad34b032 refactor: RcVec3f.DistSqr, RcVec3f.LenSqr 2023-10-25 00:40:00 +09:00
ikpil 182c230c10 refactor: Math.Tan -> MatF.Tan 2023-10-25 00:17:20 +09:00
ikpil d99666048b refactor: Math -> MathF 2023-10-25 00:09:34 +09:00
ikpil 04fa38bb96 refactor: RcVecUtils.SafeNormalize 2023-10-24 23:46:45 +09:00
ikpil ef8ef94826 refactor: TestVectorDot 2023-10-24 23:33:24 +09:00
ikpil 617eaa1287 refactor: RcVec3f.Distance 2023-10-24 00:20:42 +09:00
ikpil 0d805b5d07 refactor: RcVec3f.Copy -> RcVecUtils.Copy 2023-10-23 23:11:47 +09:00
ikpil a9888bd281 refactor: added test RcVec3f.CopyTo 2023-10-23 22:51:09 +09:00
ikpil e4dc81b027 refactor: RcVector.Copy 2023-10-23 22:43:53 +09:00
ikpil f5194e63b2 RcVec3f.Add, Subtract now corresponds to System.Numerics.Vector3.Add, Subtract in the switching build. 2023-10-22 12:56:16 +09:00
ikpil cb4a7b37d7 refactor: RcVec3f.Cross now corresponds to System.Numerics.Vector3.Normalize in the switching build 2023-10-22 12:44:50 +09:00
ikpil 3861b0a2c1 refactor: RcVec3f.Normalize now corresponds to System.Numerics.Vector3.Normalize in the switching build 2023-10-22 12:26:54 +09:00
ikpil 33fa18cd0e refactor: move Dot2D function 2023-10-21 00:27:48 +09:00
ikpil bc7b02d8bb refactor: reuse 2023-10-20 00:11:10 +09:00
ikpil 45ede19e61 refactor: preparing for switching build with System.Numerics.Vector3 2023-10-20 00:10:11 +09:00
ikpil 8d5b4c0c95 refactor: preparing for switching build with System.Numerics.Vector3 2023-10-19 00:07:50 +09:00
ikpil 3ab732e900 refactor: preparing for switching build with System.Numerics.Vector3 2023-10-19 00:03:18 +09:00