Class InfBufLine
- java.lang.Object
-
- org.locationtech.spatial4j.shape.impl.InfBufLine
-
public class InfBufLine extends java.lang.ObjectINERNAL: A buffered line of infinite length. Public for test access.
-
-
Field Summary
Fields Modifier and Type Field Description private doublebufprivate doubledistDenomInvprivate static doubleEPSError epsilon.private doubleinterceptprivate static int[]oppositeQuadprivate doubleslope
-
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) booleancontains(Point p)static voidcornerByQuadrant(Rectangle r, int cornerQuad, Point out)doubledistanceUnbuffered(Point c)INTERNAL AKA lineToPointDistancedoublegetBuf()doublegetDistDenomInv()1 / Math.sqrt(slope * slope + 1)doublegetIntercept()doublegetSlope()intquadrant(Point c)INTERNAL: AKA lineToPointQuadrant(package private) SpatialRelationrelate(Rectangle r, Point prC, Point scratch)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-