Package org.apache.lucene.document
Class SpatialQuery.EncodedRectangle
java.lang.Object
org.apache.lucene.document.SpatialQuery.EncodedRectangle
- Direct Known Subclasses:
LatLonShapeBoundingBoxQuery.EncodedLatLonRectangle
,ShapeDocValues.Reader.BBox
- Enclosing class:
- SpatialQuery
Holds spatial logic for a bounding box that works in the encoded space
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
protected int
protected boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EncodedRectangle
(int minX, int maxX, int minY, int maxY, boolean wrapsCoordinateSystem) -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
contains
(int x, int y) Checks if the rectangle contains the provided point(package private) boolean
containsLine
(int aX, int aY, int bX, int bY) Checks if the rectangle contains the provided LINE(package private) boolean
containsRectangle
(int minX, int maxX, int minY, int maxY) (package private) boolean
containsTriangle
(int aX, int aY, int bX, int bY, int cX, int cY) Checks if the rectangle contains the provided triangleprivate static boolean
edgeIntersectsBox
(int aX, int aY, int bX, int bY, int minX, int maxX, int minY, int maxY) returns true if the edge (defined by (aX, aY) (bX, bY)) intersects the boxprivate boolean
edgeIntersectsQuery
(int aX, int aY, int bX, int bY) returns true if the edge (defined by (aX, aY) (bX, bY)) intersects the query(package private) boolean
intersectsLine
(int aX, int aY, int bX, int bY) Checks if the rectangle intersects the provided LINE(package private) boolean
intersectsRectangle
(int minX, int maxX, int minY, int maxY) (package private) boolean
intersectsTriangle
(int aX, int aY, int bX, int bY, int cX, int cY) Checks if the rectangle intersects the provided triangle(package private) Component2D.WithinRelation
withinLine
(int aX, int aY, boolean ab, int bX, int bY) Returns the Within relation to the provided triangle(package private) Component2D.WithinRelation
withinTriangle
(int aX, int aY, boolean ab, int bX, int bY, boolean bc, int cX, int cY, boolean ca) Returns the Within relation to the provided triangleprotected boolean
-
Field Details
-
minX
protected int minX -
maxX
protected int maxX -
minY
protected int minY -
maxY
protected int maxY -
wrapsCoordinateSystem
protected boolean wrapsCoordinateSystem
-
-
Constructor Details
-
EncodedRectangle
protected EncodedRectangle(int minX, int maxX, int minY, int maxY, boolean wrapsCoordinateSystem)
-
-
Method Details
-
wrapsCoordinateSystem
protected boolean wrapsCoordinateSystem() -
contains
boolean contains(int x, int y) Checks if the rectangle contains the provided point -
intersectsLine
boolean intersectsLine(int aX, int aY, int bX, int bY) Checks if the rectangle intersects the provided LINE -
intersectsTriangle
boolean intersectsTriangle(int aX, int aY, int bX, int bY, int cX, int cY) Checks if the rectangle intersects the provided triangle -
intersectsRectangle
boolean intersectsRectangle(int minX, int maxX, int minY, int maxY) -
containsRectangle
boolean containsRectangle(int minX, int maxX, int minY, int maxY) -
containsLine
boolean containsLine(int aX, int aY, int bX, int bY) Checks if the rectangle contains the provided LINE -
containsTriangle
boolean containsTriangle(int aX, int aY, int bX, int bY, int cX, int cY) Checks if the rectangle contains the provided triangle -
withinLine
Returns the Within relation to the provided triangle -
withinTriangle
Component2D.WithinRelation withinTriangle(int aX, int aY, boolean ab, int bX, int bY, boolean bc, int cX, int cY, boolean ca) Returns the Within relation to the provided triangle -
edgeIntersectsQuery
private boolean edgeIntersectsQuery(int aX, int aY, int bX, int bY) returns true if the edge (defined by (aX, aY) (bX, bY)) intersects the query -
edgeIntersectsBox
private static boolean edgeIntersectsBox(int aX, int aY, int bX, int bY, int minX, int maxX, int minY, int maxY) returns true if the edge (defined by (aX, aY) (bX, bY)) intersects the box
-