- java.lang.Object
-
- org.apache.lucene.geo.Circle2D.CartesianDistance
-
- All Implemented Interfaces:
Circle2D.DistanceCalculator
- Enclosing class:
- Circle2D
private static class Circle2D.CartesianDistance extends java.lang.Object implements Circle2D.DistanceCalculator
-
-
Field Summary
Fields Modifier and Type Field Description private double
centerX
private double
centerY
private double
radiusSquared
private XYRectangle
rectangle
-
Constructor Summary
Constructors Constructor Description CartesianDistance(float centerX, float centerY, float radius)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(double x, double y)
check if the point is within a distanceboolean
disjoint(double minX, double maxX, double minY, double maxY)
check if the bounding box is disjoint with this calculator bounding boxdouble
getMaxX()
get max X of this calculatordouble
getMaxY()
get max Y of this calculatordouble
getMinX()
get min X of this calculatordouble
getMinY()
get min Y of this calculatordouble
getY()
get center Ydouble
geX()
get center Xboolean
intersectsLine(double aX, double aY, double bX, double bY)
check if the line is within a distancePointValues.Relation
relate(double minX, double maxX, double minY, double maxY)
Relates this calculator to the provided bounding boxboolean
within(double minX, double maxX, double minY, double maxY)
check if the bounding box is contains this calculator bounding box
-
-
-
Field Detail
-
centerX
private final double centerX
-
centerY
private final double centerY
-
radiusSquared
private final double radiusSquared
-
rectangle
private final XYRectangle rectangle
-
-
Method Detail
-
relate
public PointValues.Relation relate(double minX, double maxX, double minY, double maxY)
Description copied from interface:Circle2D.DistanceCalculator
Relates this calculator to the provided bounding box- Specified by:
relate
in interfaceCircle2D.DistanceCalculator
-
contains
public boolean contains(double x, double y)
Description copied from interface:Circle2D.DistanceCalculator
check if the point is within a distance- Specified by:
contains
in interfaceCircle2D.DistanceCalculator
-
intersectsLine
public boolean intersectsLine(double aX, double aY, double bX, double bY)
Description copied from interface:Circle2D.DistanceCalculator
check if the line is within a distance- Specified by:
intersectsLine
in interfaceCircle2D.DistanceCalculator
-
disjoint
public boolean disjoint(double minX, double maxX, double minY, double maxY)
Description copied from interface:Circle2D.DistanceCalculator
check if the bounding box is disjoint with this calculator bounding box- Specified by:
disjoint
in interfaceCircle2D.DistanceCalculator
-
within
public boolean within(double minX, double maxX, double minY, double maxY)
Description copied from interface:Circle2D.DistanceCalculator
check if the bounding box is contains this calculator bounding box- Specified by:
within
in interfaceCircle2D.DistanceCalculator
-
getMinX
public double getMinX()
Description copied from interface:Circle2D.DistanceCalculator
get min X of this calculator- Specified by:
getMinX
in interfaceCircle2D.DistanceCalculator
-
getMaxX
public double getMaxX()
Description copied from interface:Circle2D.DistanceCalculator
get max X of this calculator- Specified by:
getMaxX
in interfaceCircle2D.DistanceCalculator
-
getMinY
public double getMinY()
Description copied from interface:Circle2D.DistanceCalculator
get min Y of this calculator- Specified by:
getMinY
in interfaceCircle2D.DistanceCalculator
-
getMaxY
public double getMaxY()
Description copied from interface:Circle2D.DistanceCalculator
get max Y of this calculator- Specified by:
getMaxY
in interfaceCircle2D.DistanceCalculator
-
geX
public double geX()
Description copied from interface:Circle2D.DistanceCalculator
get center X- Specified by:
geX
in interfaceCircle2D.DistanceCalculator
-
getY
public double getY()
Description copied from interface:Circle2D.DistanceCalculator
get center Y- Specified by:
getY
in interfaceCircle2D.DistanceCalculator
-
-