Function JobBuild.Partition
Partition<TAxis>
(NativeArray<int> indices, int startIndex, int endIndex, NativeArray<float3> positions, float splitPoint)
Moves every agent above splitPoint on the given axis to the end of [startIndex, endIndex).
Public
Static
int Partition<TAxis> (
NativeArray<int> | indices | |
int | startIndex | |
int | endIndex | |
NativeArray<float3> | positions | |
float | splitPoint |
Moves every agent above splitPoint on the given axis to the end of [startIndex, endIndex).
Returns the index where the upper partition begins.
Takes the positions as a plain array rather than a strided NativeSlice: a slice indexes through a stride held in a struct field, which costs a multiply per access and blocks the coordinate read from folding into a constant offset.