DOTS Geometry
 
Loading...
Searching...
No Matches
Polygon2DTriangulation Class Reference

Static Public Member Functions

static List< int > EarClippingTriangulate (NativePolygon2D polygon2D, bool clockwiseWinding=true)
 Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article
 
static void EarClippingTriangulate (NativePolygon2D polygon2D, ref List< int > triangles, bool clockwiseWinding=true)
 Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article
 
static JobHandle EarClippingTriangulationJob (NativePolygon2D polygon2D, ref NativeList< int > triangles, bool clockwiseWinding=true, JobHandle dependsOn=default)
 Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article
 
static List< int > FanTriangulation (NativePolygon2D polygon2D, bool clockwiseWinding=true)
 Creates a fan triangulation for convex polygons.
 
static void FanTriangulation (NativePolygon2D polygon2D, ref List< int > triangles, bool clockwiseWinding=true)
 Creates a fan triangulation for convex polygons.
 
static JobHandle FanTriangulationJob (NativePolygon2D polygon2D, ref NativeList< int > triangles, bool clockwiseWinding=true, JobHandle dependsOn=default)
 Creates a job for fast triangulation of convex polygons.
 
static JobHandle YMonotoneTriangulationJob (NativePolygon2D polygon2D, ref NativeList< int > triangles, Allocator allocator=Allocator.TempJob, bool clockwiseWinding=true, float epsilon=10e-6f, JobHandle dependsOn=default)
 Triangulates any polygon (with holes) using monotone triangulation (which is O(n log n))
 

Member Function Documentation

◆ EarClippingTriangulate() [1/2]

static List< int > EarClippingTriangulate ( NativePolygon2D polygon2D,
bool clockwiseWinding = true )
static

Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article

Parameters
polygon2D
clockwiseWindingThe winding in which the triangles in the triangulation should be returned

◆ EarClippingTriangulate() [2/2]

static void EarClippingTriangulate ( NativePolygon2D polygon2D,
ref List< int > triangles,
bool clockwiseWinding = true )
static

Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article

Parameters
polygon2D
triangles
clockwiseWindingThe winding in which the triangles in the triangulation should be returned

◆ EarClippingTriangulationJob()

static JobHandle EarClippingTriangulationJob ( NativePolygon2D polygon2D,
ref NativeList< int > triangles,
bool clockwiseWinding = true,
JobHandle dependsOn = default )
static

Triangulates any polygon (with holes) using ear clipping algorithm (which is O(nē)-ish) Here an Article

Parameters
polygon2D
triangles
clockwiseWindingThe winding in which the triangles in the triangulation should be returned
dependsOn
Returns

◆ FanTriangulation() [1/2]

static List< int > FanTriangulation ( NativePolygon2D polygon2D,
bool clockwiseWinding = true )
static

Creates a fan triangulation for convex polygons.

Parameters
polygon2D
clockwiseWindingThe order in which the triangles in the triangulation should be returned

◆ FanTriangulation() [2/2]

static void FanTriangulation ( NativePolygon2D polygon2D,
ref List< int > triangles,
bool clockwiseWinding = true )
static

Creates a fan triangulation for convex polygons.

Parameters
polygon2D
triangles
clockwiseWindingThe order in which the triangles in the triangulation should be returned

◆ FanTriangulationJob()

static JobHandle FanTriangulationJob ( NativePolygon2D polygon2D,
ref NativeList< int > triangles,
bool clockwiseWinding = true,
JobHandle dependsOn = default )
static

Creates a job for fast triangulation of convex polygons.

Parameters
polygon2D
triangles
clockwiseWindingThe order in which the triangles in the triangulation should be returned
dependsOn
Returns

◆ YMonotoneTriangulationJob()

static JobHandle YMonotoneTriangulationJob ( NativePolygon2D polygon2D,
ref NativeList< int > triangles,
Allocator allocator = Allocator::TempJob,
bool clockwiseWinding = true,
float epsilon = 10e-6f,
JobHandle dependsOn = default )
static

Triangulates any polygon (with holes) using monotone triangulation (which is O(n log n))

Parameters
polygon2D
triangles
allocations
allocator
clockwiseWindingThe winding in which the triangles in the triangulation should be returned
epsilon
dependsOn
Returns