triangulate() 공개 메소드

Computes a triangle list that fully covers the area enclosed by the given set of points. If points are not CCW, pass false for the arePointsCCW parameter
public triangulate ( Vector2 points, bool arePointsCCW = true ) : void
points Vector2 A list of points that defines an enclosing path.
arePointsCCW bool
리턴 void
예제 #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 );
		}
예제 #2
0
        public PolygonMesh(Vector2[] points)
        {
            var triangulator = new Triangulator();

            triangulator.triangulate(points);

            setVertPositions(points);
            setTriangles(triangulator.triangleIndices.ToArray());
            recalculateBounds(true);
        }
예제 #3
0
        public PolygonMesh(Vector2[] points, bool arePointsCCW = true)
        {
            var triangulator = new Triangulator();

            triangulator.triangulate(points, arePointsCCW);

            SetVertPositions(points);
            SetTriangles(triangulator.triangleIndices.ToArray());
            RecalculateBounds(true);
        }