Moved the polygonization code to the specific regions that are being polygonized.

Also, maxPoints no longer has confusing semantics.
This commit is contained in:
TomyLobo
2013-07-27 11:12:29 +02:00
committed by wizjany
parent 34093884bc
commit c838ef7b25
5 changed files with 70 additions and 42 deletions

View File

@ -20,9 +20,12 @@
package com.sk89q.worldedit.regions;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockVector2D;
import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
import java.util.List;
import java.util.Set;
/**
@ -142,4 +145,12 @@ public interface Region extends Iterable<BlockVector>, Cloneable {
public void setWorld(LocalWorld world);
public Region clone();
/**
* Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.
*
* @param maxPoints maximum number of points to generate. -1 for no limit.
* @return the points.
*/
public List<BlockVector2D> polygonize(int maxPoints);
}