Package org.apache.lucene.geo
Interface Component2D
public interface Component2D
2D Geometry object that supports spatial relationships with bounding boxes, triangles and points.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Used by withinTriangle to check the within relationship between a triangle and the query shape (e.g. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y) relates this component2D with a point *default boolean
containsLine
(double aX, double aY, double bX, double bY) return true if this component2D contains the provided line *boolean
containsLine
(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY) return true if this component2D contains the provided line *static boolean
containsPoint
(double x, double y, double minX, double maxX, double minY, double maxY) returns true if rectangle (defined by minX, maxX, minY, maxY) contains the X Y pointdefault boolean
containsTriangle
(double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D contains the provided triangle *boolean
containsTriangle
(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D contains the provided triangle *static boolean
disjoint
(double minX1, double maxX1, double minY1, double maxY1, double minX2, double maxX2, double minY2, double maxY2) Compute whether the bounding boxes are disjoint *double
getMaxX()
max X value for the component *double
getMaxY()
max Y value for the component *double
getMinX()
min X value for the component *double
getMinY()
min Y value for the component *default boolean
intersectsLine
(double aX, double aY, double bX, double bY) return true if this component2D intersects the provided line *boolean
intersectsLine
(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY) return true if this component2D intersects the provided line *default boolean
intersectsTriangle
(double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D intersects the provided triangle *boolean
intersectsTriangle
(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D intersects the provided triangle *static boolean
pointInTriangle
(double minX, double maxX, double minY, double maxY, double x, double y, double aX, double aY, double bX, double bY, double cX, double cY) Compute whether the given x, y point is in a triangle; uses the winding order methodrelate
(double minX, double maxX, double minY, double maxY) relates this component2D with a bounding box *static boolean
within
(double minX1, double maxX1, double minY1, double maxY1, double minX2, double maxX2, double minY2, double maxY2) Compute whether the first bounding box 1 is within the second bounding box *default Component2D.WithinRelation
withinLine
(double aX, double aY, boolean ab, double bX, double bY) Compute the within relation of this component2D with a triangle *withinLine
(double minX, double maxX, double minY, double maxY, double aX, double aY, boolean ab, double bX, double bY) Compute the within relation of this component2D with a line *withinPoint
(double x, double y) Compute the within relation of this component2D with a point *default Component2D.WithinRelation
withinTriangle
(double aX, double aY, boolean ab, double bX, double bY, boolean bc, double cX, double cY, boolean ca) Compute the within relation of this component2D with a triangle *withinTriangle
(double minX, double maxX, double minY, double maxY, double aX, double aY, boolean ab, double bX, double bY, boolean bc, double cX, double cY, boolean ca) Compute the within relation of this component2D with a triangle *
-
Method Details
-
getMinX
double getMinX()min X value for the component * -
getMaxX
double getMaxX()max X value for the component * -
getMinY
double getMinY()min Y value for the component * -
getMaxY
double getMaxY()max Y value for the component * -
contains
boolean contains(double x, double y) relates this component2D with a point * -
relate
relates this component2D with a bounding box * -
intersectsLine
boolean intersectsLine(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY) return true if this component2D intersects the provided line * -
intersectsTriangle
boolean intersectsTriangle(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D intersects the provided triangle * -
containsLine
boolean containsLine(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY) return true if this component2D contains the provided line * -
containsTriangle
boolean containsTriangle(double minX, double maxX, double minY, double maxY, double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D contains the provided triangle * -
withinPoint
Compute the within relation of this component2D with a point * -
withinLine
Component2D.WithinRelation withinLine(double minX, double maxX, double minY, double maxY, double aX, double aY, boolean ab, double bX, double bY) Compute the within relation of this component2D with a line * -
withinTriangle
Component2D.WithinRelation withinTriangle(double minX, double maxX, double minY, double maxY, double aX, double aY, boolean ab, double bX, double bY, boolean bc, double cX, double cY, boolean ca) Compute the within relation of this component2D with a triangle * -
intersectsLine
default boolean intersectsLine(double aX, double aY, double bX, double bY) return true if this component2D intersects the provided line * -
intersectsTriangle
default boolean intersectsTriangle(double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D intersects the provided triangle * -
containsLine
default boolean containsLine(double aX, double aY, double bX, double bY) return true if this component2D contains the provided line * -
containsTriangle
default boolean containsTriangle(double aX, double aY, double bX, double bY, double cX, double cY) return true if this component2D contains the provided triangle * -
withinLine
default Component2D.WithinRelation withinLine(double aX, double aY, boolean ab, double bX, double bY) Compute the within relation of this component2D with a triangle * -
withinTriangle
default Component2D.WithinRelation withinTriangle(double aX, double aY, boolean ab, double bX, double bY, boolean bc, double cX, double cY, boolean ca) Compute the within relation of this component2D with a triangle * -
disjoint
static boolean disjoint(double minX1, double maxX1, double minY1, double maxY1, double minX2, double maxX2, double minY2, double maxY2) Compute whether the bounding boxes are disjoint * -
within
static boolean within(double minX1, double maxX1, double minY1, double maxY1, double minX2, double maxX2, double minY2, double maxY2) Compute whether the first bounding box 1 is within the second bounding box * -
containsPoint
static boolean containsPoint(double x, double y, double minX, double maxX, double minY, double maxY) returns true if rectangle (defined by minX, maxX, minY, maxY) contains the X Y point -
pointInTriangle
static boolean pointInTriangle(double minX, double maxX, double minY, double maxY, double x, double y, double aX, double aY, double bX, double bY, double cX, double cY) Compute whether the given x, y point is in a triangle; uses the winding order method
-