Function PathTracer.GetNextCorners
Calculate the next corners in the path.
void GetNextCorners (
NativeList<float3> | buffer | The buffer to store the corners in. The first corner will be the start point. |
int | maxCorners | The maximum number of corners to store in the buffer. At least 2 corners will always be stored. |
ref NativeArray<int> | scratchArray | A temporary array to use for calculations. This array will be resized if it is too small or uninitialized. |
Allocator | allocator | The allocator to use for the scratchArray, if it needs to be reallocated. |
traversalProvider | The traversal provider to use for the path. Or null to use the default traversal provider. |
|
path | The path to pass to the traversal provider. Or null. |
Calculate the next corners in the path.
This will also do additional simplifications to the path if possible. Inner corners will be removed. There is a limit to how many simplifications will be done per frame.
If the path contains destroyed nodes, then isStale will become true and a best-effort result will be returned.
This method may modify the PathTracer state, so it is not safe to call it from multiple threads at the same time.