Class ConvexHull
- java.lang.Object
-
- com.macrofocus.treemap.fastvoronoi.originalconvexhull.ConvexHull
-
public class ConvexHull extends java.lang.ObjectClass for computing the convex hull of given vertices with a randomized incremental algorithm in O(n*log(n)) after book of Mark de Berg/Marc van Kreveld /Mark Overmars/Otfried Schwarzkopf, Computational geometry:algorithms and applications
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Randomrand
-
Constructor Summary
Constructors Constructor Description ConvexHull()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoint(double x, double y, double z)voidaddPoint(Vertex v)java.util.List<Facet>compute()Computation method for the convex hull, after the algorithm in the Book of Mark de Berg and the others.FacetgetFacet(int i)intgetFacetCount()VertexgetVertex(int i)intgetVertexCount()
-
-
-
Method Detail
-
addPoint
public void addPoint(Vertex v)
-
addPoint
public void addPoint(double x, double y, double z)
-
compute
public java.util.List<Facet> compute()
Computation method for the convex hull, after the algorithm in the Book of Mark de Berg and the others.- Returns:
- returns computed Hull as list of facets
-
getVertexCount
public int getVertexCount()
-
getVertex
public Vertex getVertex(int i)
-
getFacetCount
public int getFacetCount()
-
getFacet
public Facet getFacet(int i)
-
-