Class InfBufLine


  • public class InfBufLine
    extends java.lang.Object
    INERNAL: A buffered line of infinite length. Public for test access.
    • Field Detail

      • slope

        private final double slope
      • intercept

        private final double intercept
      • buf

        private final double buf
      • distDenomInv

        private final double distDenomInv
      • oppositeQuad

        private static final int[] oppositeQuad
    • Constructor Detail

      • InfBufLine

        InfBufLine​(double slope,
                   Point point,
                   double buf)
    • Method Detail

      • contains

        boolean contains​(Point p)
      • distanceUnbuffered

        public double distanceUnbuffered​(Point c)
        INTERNAL AKA lineToPointDistance
      • quadrant

        public int quadrant​(Point c)
        INTERNAL: AKA lineToPointQuadrant
      • cornerByQuadrant

        public static void cornerByQuadrant​(Rectangle r,
                                            int cornerQuad,
                                            Point out)
      • getSlope

        public double getSlope()
      • getIntercept

        public double getIntercept()
      • getBuf

        public double getBuf()
      • getDistDenomInv

        public double getDistDenomInv()
        1 / Math.sqrt(slope * slope + 1)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object