simple ear clipping triangulator. the final triangles will be present in the triangleIndices list
コード例 #1
0
ファイル: PolygonMesh.cs プロジェクト: prime31/Nez
		public PolygonMesh( Vector2[] points, bool arePointsCCW = true )
		{
			var triangulator = new Triangulator();
			triangulator.triangulate( points, arePointsCCW );

			setVertPositions( points );
			setTriangles( triangulator.triangleIndices.ToArray() );
			recalculateBounds( true );
		}