TriangulatePolygon..::..Run2D Method

Triangulates a list of loops into faces in O(n*log(n)) time. Ignoring the negative space, fills in holes. DO NOT USE this parameter for watertight geometry.

Namespace:  TVGL
Assembly:  TessellationAndVoxelizationGeometryLibraryUniversal (in TessellationAndVoxelizationGeometryLibraryUniversal.dll)

Syntax


public static List<List<Vertex[]>> Run2D(
	IList<Point[]> points2D,
	out List<List<int>> groupsOfLoops,
	ref bool[] isPositive,
	bool ignoreNegativeSpace
)
Public Shared Function Run2D ( _
	points2D As IList(Of Point()), _
	<OutAttribute> ByRef groupsOfLoops As List(Of List(Of Integer)), _
	ByRef isPositive As Boolean(), _
	ignoreNegativeSpace As Boolean _
) As List(Of List(Of Vertex()))
public:
static List<List<array<Vertex^>^>^>^ Run2D(
	IList<array<Point^>^>^ points2D, 
	[OutAttribute] List<List<int^>^>^% groupsOfLoops, 
	array<bool^>^% isPositive, 
	bool^ ignoreNegativeSpace
)

Parameters

points2D
Type: IList<(Of <(<'array<Point>[]()[][]>)>)>
The points2 d.
groupsOfLoops
Type: List<(Of <(<'List<(Of <(<'Int32>)>)>>)>)>%
The groups of loops.
isPositive
Type: array<Boolean>[]()[][]%
The is positive.
ignoreNegativeSpace
Type: Boolean
if set to true [ignore negative space].

Return Value

List<List<Vertex[]>>.

Exceptions


ExceptionCondition
Exception Inputs into 'TriangulatePolygon' are unbalanced or Duplicate point found or Incorrect balance of node types or Incorrect balance of node types or Negative Loop must be inside a positive loop, but no positive loops are left. Check if loops were created correctly. or Trapezoidation failed to complete properly. Check to see that the assumptions are met. or Incorrect number of triangles created in triangulate function or
Exception
Exception