Class Segment


  • public class Segment
    extends Object
    Line segment of an edge between two points
    Since:
    1.0.5
    Author:
    osbornb
    • Constructor Detail

      • Segment

        public Segment​(int edge,
                       int ring,
                       Point leftPoint,
                       Point rightPoint)
        Constructor
        Parameters:
        edge - edge number
        ring - ring number
        leftPoint - left point
        rightPoint - right point
    • Method Detail

      • getEdge

        public int getEdge()
        Get the edge number
        Returns:
        edge number
      • getRing

        public int getRing()
        Get the polygon ring number
        Returns:
        polygon ring number
      • getLeftPoint

        public Point getLeftPoint()
        Get the left point
        Returns:
        left point
      • getRightPoint

        public Point getRightPoint()
        Get the right point
        Returns:
        right point
      • getAbove

        public Segment getAbove()
        Get the segment above
        Returns:
        segment above
      • setAbove

        public void setAbove​(Segment above)
        Set the segment above
        Parameters:
        above - segment above
      • getBelow

        public Segment getBelow()
        Get the segment below
        Returns:
        segment below
      • setBelow

        public void setBelow​(Segment below)
        Set the segment below
        Parameters:
        below - segment below