private static void |
Tessellator.checkIntersection(Tessellator.Node a,
boolean isMorton) |
Computes if edge defined by a and b overlaps with a polygon edge *
|
private static void |
Tessellator.checkIntersectionPoint(Tessellator.Node a,
Tessellator.Node b) |
|
private static Tessellator.Node |
Tessellator.cureLocalIntersections(Tessellator.Node startNode,
java.util.List<Tessellator.Triangle> tessellation,
boolean mortonOptimized) |
Iterate through all polygon nodes and remove small local self-intersections *
|
private static java.util.List<Tessellator.Triangle> |
Tessellator.earcutLinkedList(java.lang.Object polygon,
Tessellator.Node currEar,
java.util.List<Tessellator.Triangle> tessellation,
Tessellator.State state,
boolean mortonOptimized,
Tessellator.Monitor monitor,
int depth) |
Main ear slicing loop which triangulates the vertices of a polygon, provided as a doubly-linked
list.
|
private static void |
Tessellator.eliminateHole(Tessellator.Node holeNode,
Tessellator.Node outerNode,
double holeMinX,
double holeMaxX,
double holeMinY,
double holeMaxY) |
Finds a bridge between vertices that connects a hole with an outer ring, and links it
|
private static Tessellator.Node |
Tessellator.eliminateHoles(java.util.List<Tessellator.Node> holeList,
java.util.Map<Tessellator.Node,?> holeListPolygons,
Tessellator.Node outerNode) |
|
private static Tessellator.Node |
Tessellator.eliminateHoles(Polygon polygon,
Tessellator.Node outerNode) |
Links every hole into the outer loop, producing a single-ring polygon without holes.
|
private static Tessellator.Node |
Tessellator.eliminateHoles(XYPolygon polygon,
Tessellator.Node outerNode) |
|
private static Tessellator.Node |
Tessellator.fetchHoleBridge(Tessellator.Node holeNode,
Tessellator.Node outerNode) |
David Eberly's algorithm for finding a bridge between a hole and outer polygon
|
private static Tessellator.Node |
Tessellator.fetchLeftmost(Tessellator.Node start) |
Finds the left-most hole of a polygon ring.
|
private static Tessellator.Node |
Tessellator.filterPoints(Tessellator.Node start,
Tessellator.Node end) |
Eliminate colinear/duplicate points from the doubly linked list
|
private static java.util.List<Point> |
Tessellator.getPoints(Tessellator.Node start) |
|
private static Tessellator.Node |
Tessellator.getSharedVertex(Tessellator.Node polygon,
Tessellator.Node vertex) |
Check if the provided vertex is in the polygon and return it *
|
private static Tessellator.Node |
Tessellator.insertNode(double[] x,
double[] y,
int index,
int vertexIndex,
Tessellator.Node lastNode,
boolean isGeo) |
Creates a node and optionally links it with a previous node in a circular doubly-linked list
|
private static boolean |
Tessellator.isCWPolygon(Tessellator.Node start,
Tessellator.Node end) |
Determine whether the polygon defined between node start and node end is CW
|
private static boolean |
Tessellator.isEar(Tessellator.Node ear,
boolean mortonOptimized) |
Determines whether a polygon node forms a valid ear with adjacent nodes.
|
private static boolean |
Tessellator.isEdgeFromPolygon(Tessellator.Node a,
Tessellator.Node b,
boolean isMorton) |
Computes if edge defined by a and b overlaps with a polygon edge *
|
private static boolean |
Tessellator.isIntersectingPolygon(Tessellator.Node start,
double x0,
double y0,
double x1,
double y1) |
Determines if the diagonal of a polygon is intersecting with any polygon elements.
|
private static boolean |
Tessellator.isLocallyInside(Tessellator.Node a,
Tessellator.Node b) |
|
private static boolean |
Tessellator.isMortonEdgeFromPolygon(Tessellator.Node a,
Tessellator.Node b) |
Uses morton code for speed to determine whether or not and edge defined by a and b overlaps
with a polygon edge
|
private static boolean |
Tessellator.isPointInLine(Tessellator.Node a,
Tessellator.Node b,
double lon,
double lat) |
returns true if the lon, lat point is colinear w/ the provided a and b point
|
private static boolean |
Tessellator.isPointInLine(Tessellator.Node a,
Tessellator.Node b,
Tessellator.Node point) |
|
private static boolean |
Tessellator.isValidDiagonal(Tessellator.Node a,
Tessellator.Node b) |
Determines whether a diagonal between two polygon nodes lies within a polygon interior.
|
private static boolean |
Tessellator.isVertexEquals(Tessellator.Node a,
double x,
double y) |
Determines if two point vertices are equal.
|
private static boolean |
Tessellator.isVertexEquals(Tessellator.Node a,
Tessellator.Node b) |
Determines if two point vertices are equal.
|
private static boolean |
Tessellator.middleInsert(Tessellator.Node start,
double x0,
double y0,
double x1,
double y1) |
Determine whether the middle point of a polygon diagonal is contained within the polygon
|
private static void |
Tessellator.mortonCheckIntersection(Tessellator.Node a,
Tessellator.Node b) |
Uses morton code for speed to determine whether or not and edge defined by a and b overlaps
with a polygon edge
|
private static boolean |
Tessellator.mortonIsEar(Tessellator.Node ear) |
Uses morton code for speed to determine whether or a polygon node forms a valid ear w/ adjacent
nodes
|
private static void |
Tessellator.notifyMonitor(java.lang.String status,
Tessellator.Monitor monitor,
Tessellator.Node start,
java.util.List<Tessellator.Triangle> tessellation) |
|
private static void |
Tessellator.notifyMonitor(Tessellator.State state,
int depth,
Tessellator.Monitor monitor,
Tessellator.Node start,
java.util.List<Tessellator.Triangle> tessellation) |
|
private static void |
Tessellator.notifyMonitorSplit(int depth,
Tessellator.Monitor monitor,
Tessellator.Node searchNode,
Tessellator.Node diagonalNode) |
|
private static void |
Tessellator.removeNode(Tessellator.Node node,
boolean edgeFromPolygon) |
Removes a node from the doubly linked list
|
private static double |
Tessellator.signedArea(Tessellator.Node start,
Tessellator.Node end) |
Determine the signed area between node start and node end
|
private static void |
Tessellator.sortByMorton(Tessellator.Node start) |
Interlinks polygon nodes in Z-Order.
|
private static void |
Tessellator.sortByMortonWithReset(Tessellator.Node start) |
Interlinks polygon nodes in Z-Order.
|
private static boolean |
Tessellator.splitEarcut(java.lang.Object polygon,
Tessellator.Node start,
java.util.List<Tessellator.Triangle> tessellation,
boolean mortonOptimized,
Tessellator.Monitor monitor,
int depth) |
Attempt to split a polygon and independently triangulate each side.
|
private static Tessellator.Node |
Tessellator.splitPolygon(Tessellator.Node a,
Tessellator.Node b,
boolean edgeFromPolygon) |
Links two polygon vertices using a bridge.
|
private static void |
Tessellator.tathamSort(Tessellator.Node list) |
Simon Tatham's doubly-linked list O(n log n) mergesort see:
http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
|