public class IVoronoi2D
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
IVoronoi2D.RadialComparator |
Constructor and Description |
---|
IVoronoi2D() |
Modifier and Type | Method and Description |
---|---|
static IVec2 |
circumcenter(IVec2[] t) |
static IVec2 |
circumcenter(IVec2 t1,
IVec2 t2,
IVec2 t3) |
static IVec2[] |
closeWithBoundary(IVec2[] openPts,
IVec2 minUV,
IVec2 maxUV) |
static IVec2[] |
edgePoint(IVec2 vertex,
IVec2[] triangle)
get two other edge points of a triangle other than the given vertex
|
static IVec2[][] |
getEdges(IVec2[] pts) |
static IVec2[][] |
getPolygons(IVec2[] pts)
Getting voronoi polygons out of array of 2D points
|
static IVec2[][] |
getPolygons(IVec2[] pts,
IVec2 minUV,
IVec2 maxUV)
Getting voronoi polygons out of array of 2D points.
|
static boolean |
insideBoundary(IVec2 pt,
IVec2 minUV,
IVec2 maxUV) |
static boolean |
insideTriangle(IVec2 pt,
IVec2 tr1,
IVec2 tr2,
IVec2 tr3) |
static IVec2 |
intersectWithBoundary(IVec2 ptIn,
IVec2 ptOut,
IVec2[] boundary) |
static IVec2[] |
pointsInsideBoundary(IVec2[] pts,
IVec2 minUV,
IVec2 maxUV,
boolean close)
check all points in pts is in boundary and if not, remove and insert an intersection point with the boundary
|
static IVec2[] |
removeDuplicatedPoint(IVec2[] pts,
double tolerance) |
static java.util.ArrayList<IVec2> |
sortTriangleEdgePoint(IVec2 center,
java.util.ArrayList<IVec2[]> triangles)
when a point is surrounded by triangles, sort triangles in the order they are touching.
|
public static IVec2[][] getPolygons(IVec2[] pts)
public static IVec2[][] getPolygons(IVec2[] pts, IVec2 minUV, IVec2 maxUV)
minUV
- minimum corner of boundary rectanglemaxUV
- maximum corner of boundary rectanglepublic static IVec2 intersectWithBoundary(IVec2 ptIn, IVec2 ptOut, IVec2[] boundary)
public static IVec2[] pointsInsideBoundary(IVec2[] pts, IVec2 minUV, IVec2 maxUV, boolean close)
public static IVec2[] closeWithBoundary(IVec2[] openPts, IVec2 minUV, IVec2 maxUV)
public static java.util.ArrayList<IVec2> sortTriangleEdgePoint(IVec2 center, java.util.ArrayList<IVec2[]> triangles)
public static IVec2[] edgePoint(IVec2 vertex, IVec2[] triangle)