Class PolygonsSet.ConnectableSegment

  • Enclosing class:
    PolygonsSet

    private static class PolygonsSet.ConnectableSegment
    extends Segment
    Private extension of Segment allowing connection.
    • Constructor Detail

      • ConnectableSegment

        ConnectableSegment​(Vector2D start,
                           Vector2D end,
                           Line line,
                           BSPTree<Euclidean2D> node,
                           BSPTree<Euclidean2D> startNode,
                           BSPTree<Euclidean2D> endNode)
        Build a segment.
        Parameters:
        start - start point of the segment
        end - end point of the segment
        line - line containing the segment
        node - node containing the segment
        startNode - node whose intersection with current node defines start point
        endNode - node whose intersection with current node defines end point
    • Method Detail

      • getNode

        public BSPTree<Euclidean2D> getNode()
        Get the node containing segment.
        Returns:
        node containing segment
      • getStartNode

        public BSPTree<Euclidean2D> getStartNode()
        Get the node whose intersection with current node defines start point.
        Returns:
        node whose intersection with current node defines start point
      • getEndNode

        public BSPTree<Euclidean2D> getEndNode()
        Get the node whose intersection with current node defines end point.
        Returns:
        node whose intersection with current node defines end point
      • setPrevious

        public void setPrevious​(PolygonsSet.ConnectableSegment previous)
        Set the previous segment.
        Parameters:
        previous - previous segment
      • setProcessed

        public void setProcessed​(boolean processed)
        Set the processed flag.
        Parameters:
        processed - processed flag to set
      • isProcessed

        public boolean isProcessed()
        Check if the segment has been processed.
        Returns:
        true if the segment has been processed