Function PathTracer.GetNextCorners

GetNextCorners (NativeList<float3> buffer, int maxCorners, ref NativeArray<int> scratchArray, Allocator allocator, ITraversalProvider traversalProvider, Path path)

Calculate the next corners in the path.

Public
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.

ITraversalProvider

traversalProvider

The traversal provider to use for the path. Or null to use the default traversal provider.

Path

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.

Note

This method may modify the PathTracer state, so it is not safe to call it from multiple threads at the same time.