Interface LayerDelaunay
- All Known Implementing Classes:
LayerTinfour
public interface LayerDelaunay
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLineString(org.locationtech.jts.geom.LineString line, int attribute) voidaddPolygon(org.locationtech.jts.geom.Polygon newPoly, int attribute) Append a polygon into the triangulationvoidaddVertex(org.locationtech.jts.geom.Coordinate vertexCoordinate) Append a vertex into the triangulationWhen the processDelaunay has been called, retrieve results Triangle link triangles neighbor by their index.When the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.List<org.locationtech.jts.geom.Coordinate> When the processDelaunay has been called, retrieve results verticesvoidhintInit(org.locationtech.jts.geom.Envelope boundingBox, long polygonCount, long verticesCount) This optional method give an hint of the size of the delaunay process.voidLaunch delaunay processvoidreset()Remove all data, come back to the constructor statevoidsetMaxArea(Double maxArea) Set the maximum area in m² Call processDelauney after to take account of this method.voidsetMinAngle(Double minAngle) Set the minimum angle, if you wish to enforce the quality of the delaunay Call processDelauney after to take account of this method.voidsetRetrieveNeighbors(boolean retrieve) Enable or Disable the collecting of triangles neighboring data.
-
Method Details
-
hintInit
void hintInit(org.locationtech.jts.geom.Envelope boundingBox, long polygonCount, long verticesCount) throws LayerDelaunayError This optional method give an hint of the size of the delaunay process. Call this method before the first call of addPolygon This method is used only for optimization.- Parameters:
boundingBox- Bounding box of the delaunay meshpolygonCount- Size of the polygon count- Throws:
LayerDelaunayError
-
addPolygon
Append a polygon into the triangulation- Parameters:
newPoly- Polygon to append into the mesh, internal rings will be inserted as holes.attribute- Polygon attribute.Triangle.getAttribute()- Throws:
LayerDelaunayError
-
addVertex
Append a vertex into the triangulation- Parameters:
vertexCoordinate- coordinate of the new vertex- Throws:
LayerDelaunayError
-
addLineString
void addLineString(org.locationtech.jts.geom.LineString line, int attribute) throws LayerDelaunayError - Throws:
LayerDelaunayError
-
setMinAngle
Set the minimum angle, if you wish to enforce the quality of the delaunay Call processDelauney after to take account of this method.- Parameters:
minAngle- Minimum angle in radiant- Throws:
LayerDelaunayError
-
setMaxArea
Set the maximum area in m² Call processDelauney after to take account of this method.- Parameters:
maxArea- Maximum area in m²- Throws:
LayerDelaunayError
-
processDelaunay
Launch delaunay process- Throws:
LayerDelaunayError
-
getVertices
When the processDelaunay has been called, retrieve results vertices- Throws:
LayerDelaunayError
-
getTriangles
When the processDelaunay has been called, retrieve results Triangle link unique vertices by their index.- Throws:
LayerDelaunayError
-
getNeighbors
When the processDelaunay has been called, retrieve results Triangle link triangles neighbor by their index.- Throws:
LayerDelaunayError
-
reset
void reset()Remove all data, come back to the constructor state -
setRetrieveNeighbors
void setRetrieveNeighbors(boolean retrieve) Enable or Disable the collecting of triangles neighboring data.- Parameters:
retrieve-
-