Class PolygonsSet.Edge

java.lang.Object
org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet.Edge
Enclosing class:
PolygonsSet

private static class PolygonsSet.Edge extends Object
Internal class for holding edges while they are processed to build a BSP tree.
  • Field Details

  • Constructor Details

    • Edge

      Edge(PolygonsSet.Vertex start, PolygonsSet.Vertex end, Line line)
      Build an edge not contained in any node yet.
      Parameters:
      start - start vertex
      end - end vertex
      line - line supporting the edge
  • Method Details

    • getStart

      public PolygonsSet.Vertex getStart()
      Get start vertex.
      Returns:
      start vertex
    • getEnd

      public PolygonsSet.Vertex getEnd()
      Get end vertex.
      Returns:
      end vertex
    • getLine

      public Line getLine()
      Get the line supporting this edge.
      Returns:
      line supporting this edge
    • setNode

      public void setNode(BSPTree<Euclidean2D> node)
      Set the node whose cut hyperplane contains this edge.
      Parameters:
      node - node whose cut hyperplane contains this edge
    • getNode

      public BSPTree<Euclidean2D> getNode()
      Get the node whose cut hyperplane contains this edge.
      Returns:
      node whose cut hyperplane contains this edge (null if edge has not yet been inserted into the BSP tree)
    • split

      public PolygonsSet.Vertex split(Line splitLine)
      Split the edge.

      Once split, this edge is not referenced anymore by the vertices, it is replaced by the two half-edges and an intermediate splitting vertex is introduced to connect these two halves.

      Parameters:
      splitLine - line splitting the edge in two halves
      Returns:
      split vertex (its incoming and outgoing edges are the two halves)