Static Public Member Functions | |
static JobHandle | CalculateVoronoi (NativeArray< float2 > points, ref NativeArray< NativePolygon2D > polygons, ref NativeArray< int > polygonSites, out JobAllocations allocations, Allocator allocator=Allocator.TempJob, float addedMargin=1.0f, float epsilon0=10e-8f, float epsilon1=10e-6f, JobHandle dependsOn=default) |
Calculates and returns the polygons that form a Voronoi Diagram by forming the dual graph of the delaunay triangulation. A job is scheduled to calculate the bounding rectangle. | |
static JobHandle | CalculateVoronoi (Rect bounds, NativeArray< float2 > points, ref NativeArray< NativePolygon2D > polygons, ref NativeArray< int > polygonSites, out JobAllocations allocations, Allocator allocator=Allocator.TempJob, float epsilon0=10e-8f, float epsilon1=10e-6f, JobHandle dependsOn=default) |
Calculates and returns the polygons that form a Voronoi Diagram by forming the dual graph of the delaunay triangulation. | |
static JobHandle | CalculateVoronoiLookupTable (int2 dimension, NativeArray< float2 > points, ref NativeArray< int > table, out JobAllocations allocations, Allocator allocator=Allocator.TempJob, float addedMargin=1.0f, JobHandle dependsOn=default) |
Calculates a Voronoi Lookup Table (VoLT) with a certain dimension. A job is scheduled to calculate the bounding rectangle. | |
static JobHandle | CalculateVoronoiLookupTable (int2 dimension, Rect bounds, NativeArray< float2 > points, ref NativeArray< int > table, out JobAllocations allocations, Allocator allocator=Allocator.TempJob, JobHandle dependsOn=default) |
Calculates a Voronoi Lookup Table (VoLT) with a certain dimension within the given bounds. | |
static int | CalculateVoronoiLookupTableIndex (int2 dimension, Rect bounds, float2 position) |
Returns the index of a Voronoi Lookup Table (VoLT) a given position falls into. If the position is out of the bounds, the index returned is invalid (there are no bound checks) | |
|
static |
Calculates and returns the polygons that form a Voronoi Diagram by forming the dual graph of the delaunay triangulation. A job is scheduled to calculate the bounding rectangle.
points | The sites of the voronoi diagram |
polygons | An array that is filled with the resulting polygons. Its length should be equal to the number of points |
polygonSites | An array that is filled with integers for each polygon. Each integer corresponds to the site the polygon belongs to |
allocations | |
allocator | |
addedMargin | Additional margin space for the boundary |
epsilon0 | The error rate for forming the dual graph |
epsilon1 | The error rate for boundary intersections |
dependsOn |
|
static |
Calculates and returns the polygons that form a Voronoi Diagram by forming the dual graph of the delaunay triangulation.
bounds | The enclosing boundary of the points |
points | The sites of the voronoi diagram |
polygons | An array that is filled with the resulting polygons. Its length should be equal to the number of points |
polygonSites | An array that is filled with integers for each polygon. Each integer corresponds to the site the polygon belongs to |
allocations | |
allocator | |
epsilon0 | The error rate for forming the dual graph |
epsilon1 | The error rate for boundary intersections |
dependsOn |
|
static |
Calculates a Voronoi Lookup Table (VoLT) with a certain dimension. A job is scheduled to calculate the bounding rectangle.
dimension | The dimension in X and Y (similar to a texture resolution) |
points | The sites of the voronoi diagram |
table | The table is returned after the scheduled Job is completed |
allocations | |
allocator | |
addedMargin | Additional margin space for the boundary |
dependsOn |
|
static |
Calculates a Voronoi Lookup Table (VoLT) with a certain dimension within the given bounds.
dimension | The dimension in X and Y (similar to a texture resolution) |
bounds | The enclosing boundary of the points |
points | The sites of the voronoi diagram |
table | The table is returned after the scheduled Job is completed |
allocations | |
allocator | |
dependsOn |
|
static |
Returns the index of a Voronoi Lookup Table (VoLT) a given position falls into. If the position is out of the bounds, the index returned is invalid (there are no bound checks)
dimension | |
bounds | |
position |