org.osm2world.core.map_elevation.creation
public class DelaunayTriangulation extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DelaunayTriangulation.DelaunayTriangle
a triangle which is the dual of a site in the Voronoi Diagram.
|
class |
DelaunayTriangulation.NaturalNeighbors |
Modifier and Type | Field and Description |
---|---|
DelaunayTriangulation.DelaunayTriangle |
handleTriangle
a fake triangle outside of the bounds that is used as a start
for iterating/walking through the triangulation along neighborships
|
Constructor and Description |
---|
DelaunayTriangulation(AxisAlignedBoundingBoxXZ bounds) |
Modifier and Type | Method and Description |
---|---|
DelaunayTriangulation.DelaunayTriangle |
getEnlosingTriangle(VectorXZ point)
returns the triangle containing the given point
|
List<DelaunayTriangulation.DelaunayTriangle> |
getIncidentTriangles(VectorXYZ point) |
Iterable<DelaunayTriangulation.DelaunayTriangle> |
getTriangles()
returns all triangles
|
List<TriangleXZ> |
getVoronoiCellSectors(VectorXYZ point) |
List<TriangleXZ> |
getVoronoiCellSectors(VectorXYZ point,
Collection<DelaunayTriangulation.DelaunayTriangle> incidentTriangles)
TODO describe effect of incident triangles
|
double |
getVoronoiCellSize(VectorXYZ point,
Collection<DelaunayTriangulation.DelaunayTriangle> incidentTriangles)
returns the size of a voronoi cell or a part of the voronoi cell.
|
Stack<DelaunayTriangulation.Flip> |
insert(VectorXYZ point) |
DelaunayTriangulation.NaturalNeighbors |
probe(VectorXZ point)
temporarily inserts a point to calculate its natural neighbors,
then undoes the insertion
|
public final DelaunayTriangulation.DelaunayTriangle handleTriangle
public DelaunayTriangulation(AxisAlignedBoundingBoxXZ bounds)
public Iterable<DelaunayTriangulation.DelaunayTriangle> getTriangles()
public Stack<DelaunayTriangulation.Flip> insert(VectorXYZ point)
public DelaunayTriangulation.NaturalNeighbors probe(VectorXZ point)
public List<DelaunayTriangulation.DelaunayTriangle> getIncidentTriangles(VectorXYZ point)
public List<TriangleXZ> getVoronoiCellSectors(VectorXYZ point)
public List<TriangleXZ> getVoronoiCellSectors(VectorXYZ point, Collection<DelaunayTriangulation.DelaunayTriangle> incidentTriangles)
public double getVoronoiCellSize(VectorXYZ point, Collection<DelaunayTriangulation.DelaunayTriangle> incidentTriangles)
point
- point corresponding to the voronoi cellincidentTriangles
- if this contains all triangles incident to
point, then the size of the entire cell will be calculated.
Otherwise, only sides that contain at least one circumcircle center
of a triangle in this collection are taken into account.public DelaunayTriangulation.DelaunayTriangle getEnlosingTriangle(VectorXZ point)
point
- must lie within the triangulation; != null