arthurbrussee / knn Goto Github PK
View Code? Open in Web Editor NEWFast K-Nearest Neighbour Library for Unity DOTS
License: MIT License
Fast K-Nearest Neighbour Library for Unity DOTS
License: MIT License
Errors and crash when using an updated version of the "Collections" package.
I didn't try to fix it for now, I will look into it.
Thanks!
I found a bug when trying to get point cloud neighbors of mesh vertices.
I join a script that parses a file and compute the neighbor search to this issue.
Error generated is:
IndexOutOfRangeException: Index 5 is out of range of '5' Length.
Unity.Collections.NativeArray1[T].FailOutOfRangeError (System.Int32 index) (at C:/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:208) Unity.Collections.NativeArray
1[T].CheckElementWriteAccess (System.Int32 index) (at C:/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:127)
Unity.Collections.NativeArray1[T].set_Item (System.Int32 index, T value) (at C:/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:146) KNN.Internal.MinHeap.PushObj (KNN.Internal.KdQueryNode obj, System.Single h) (at C:/Users/Xavier/Dev/KNN/MinHeap.cs:118) KNN.KnnContainer.PushToHeap (System.Int32 nodeIndex, Unity.Mathematics.float3 tempClosestPoint, Unity.Mathematics.float3 queryPosition, KNN.KnnContainer+KnnQueryTemp& temp) (at C:/Users/Xavier/Dev/KNN/KnnContainer.cs:449) KNN.KnnContainer.KNearest (Unity.Mathematics.float3 queryPosition, Unity.Collections.NativeSlice
1[T] result, KNN.KnnContainer+KnnQueryTemp& temp) (at C:/Users/Xavier/Dev/KNN/KnnContainer.cs:500)
KNN.Jobs.KNearestBatchQueryJob.Execute (System.Int32 startIndex, System.Int32 count) (at C:/Users/Xavier/Dev/KNN/KnnJobs.cs:61)
Unity.Jobs.IJobParallelForBatchExtensions+ParallelForBatchJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/[email protected]/Unity.Jobs/IJobParallelForBatch.cs:82)
QueryKNearest
returns the results in order, furthest to closest. This should be mentioned somewhere at the very least. This caused me so manny headaches until I said let's try it in reverse see what happens.
When building a tree, the right node is split if the left node is large enough, and vice versa. I assume this is not intentional and the node is supposed to be split based on its own size.
https://github.com/ArthurBrussee/KNN/blob/main/KnnContainer.cs#L156..L162
Library\PackageCache\com.akb.knn@e5efc63\Demo\KnnVisualizationDemo.cs(7,32): error CS0234: The type or namespace name 'ParticleSystemJobs' does not exist in the namespace 'UnityEngine.Experimental' (are you missing an assembly reference?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.