public final class Triangulator extends Object
Modifier and Type | Method and Description |
---|---|
static Edge |
calcDelauneyTriangulation(Graph result,
IDataProvider pointData,
IEdgeMap revMap)
Computes a Delauney triangulation of the given points.
|
static Edge |
triangulatePoints(Graph result,
IDataProvider pointData,
IEdgeMap reverseEdgeMap)
Computes a triangulation of the given points.
|
static Edge |
triangulatePoints(YList points,
Graph result,
INodeMap resultMap,
IEdgeMap reverseEdgeMap)
Computes a triangulation of the given points.
|
public static final Edge calcDelauneyTriangulation(Graph result, IDataProvider pointData, IEdgeMap revMap)
A Delauney triangulation is a triangulation such that none of the given points is inside the circumcircle of any of the calculated triangles.
The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to construct all faces of the plane graph and to determine its outer face.
result
- a graph whose nodes represent the points that need to be triangulated.pointData
- must provide the location (YPoint) for each node in the given graph.revMap
- a node map that will contain for each edge its reverse edge. If this argument is null
then no reverse edge
information will be available.public static final Edge triangulatePoints(Graph result, IDataProvider pointData, IEdgeMap reverseEdgeMap)
The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to construct all faces of the plane graph and to determine its outer face.
result
- a graph whose nodes represent the points that need to be triangulated.pointData
- must provide the location (YPoint) for each node in the given graph.reverseEdgeMap
- a node map that will contain for each edge its reverse edge. If this argument is null
then no reverse edge
information will be available.public static final Edge triangulatePoints(YList points, Graph result, INodeMap resultMap, IEdgeMap reverseEdgeMap)
The calculated triangulation is represented by an embedded graph, i.e. to each edge there exists a reverse edge and the outedges around each node are in embedded order. The returned edge and the (optional) reverseEdgeMap can be used to construct all faces of the plane graph and to determine its outer face.
points
- the point set to be triangulated. The points must be provided as a YList of YPoints.result
- the resulting triangulationresultMap
- the node map that forms the link between a point and a node.reverseEdgeMap
- a node map that will contain for each edge its reverse edge. If this argument is null
then no reverse edge
information will be available.