Class InfBufLine
- java.lang.Object
-
- org.locationtech.spatial4j.shape.impl.InfBufLine
-
public class InfBufLine extends java.lang.Object
INERNAL: A buffered line of infinite length. Public for test access.
-
-
Field Summary
Fields Modifier and Type Field Description private double
buf
private double
distDenomInv
private static double
EPS
Error epsilon.private double
intercept
private static int[]
oppositeQuad
private double
slope
-
Constructor Summary
Constructors Constructor Description InfBufLine(double slope, Point point, double buf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
contains(Point p)
static void
cornerByQuadrant(Rectangle r, int cornerQuad, Point out)
double
distanceUnbuffered(Point c)
INTERNAL AKA lineToPointDistancedouble
getBuf()
double
getDistDenomInv()
1 / Math.sqrt(slope * slope + 1)double
getIntercept()
double
getSlope()
int
quadrant(Point c)
INTERNAL: AKA lineToPointQuadrant(package private) SpatialRelation
relate(Rectangle r, Point prC, Point scratch)
java.lang.String
toString()
-
-
-
Field Detail
-
EPS
private static final double EPS
Error epsilon.- See Also:
- Constant Field Values
-
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
-
relate
SpatialRelation relate(Rectangle r, Point prC, Point scratch)
-
contains
boolean contains(Point p)
-
distanceUnbuffered
public double distanceUnbuffered(Point c)
INTERNAL AKA lineToPointDistance
-
quadrant
public int quadrant(Point c)
INTERNAL: AKA lineToPointQuadrant
-
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 classjava.lang.Object
-
-