Class Polyhedron


  • public class Polyhedron
    extends java.lang.Object
    Polyhedron defined by a list of HalfPlanes.
    • Constructor Summary

      Constructors 
      Constructor Description
      Polyhedron()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAngle​(GeometryAngle angle)
      Adds a GeometryAngle as two HalfPlanes to the polyhedron.
      void addHalfPlane​(HalfPlane halfPlane)
      Adds a half plane to the polyhedron.
      org.locationtech.jts.geom.Geometry getConvexHull()
      Convex hull of the (potentially unbound) polyhedron.
      boolean inside​(org.locationtech.jts.geom.Coordinate c)
      Tests, if a Coordinate lays inside of the polyhedron.
      void resolve()
      Resolve the vertex-representation from the half-plane representation.
      void setUnboundExtend​(double unboundExtend)
      Factor of the extend of the unbound section.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Polyhedron

        public Polyhedron()
    • Method Detail

      • addHalfPlane

        public void addHalfPlane​(HalfPlane halfPlane)
        Adds a half plane to the polyhedron. Automatically resolves the vertex-representation and filters out degenerate half planes.
        Parameters:
        halfPlane - half plane to be added
        See Also:
        resolve(), filterDegenerate()
      • resolve

        public void resolve()
        Resolve the vertex-representation from the half-plane representation. We compute naively all of the intersections filtering them on whether they are inside. Also, we add two unbound section coordinates.
      • inside

        public boolean inside​(org.locationtech.jts.geom.Coordinate c)
        Tests, if a Coordinate lays inside of the polyhedron.
        Parameters:
        c - tested coordinate
        Returns:
        whether the tested coordinate lays inside of the polyhedron
      • getConvexHull

        public org.locationtech.jts.geom.Geometry getConvexHull()
        Convex hull of the (potentially unbound) polyhedron. By default extend the polyhedron 10 length units into the unbound region. This extension factor can be manipulated using unboundExtend.
      • setUnboundExtend

        public void setUnboundExtend​(double unboundExtend)
        Factor of the extend of the unbound section.