Apache Solr open-source search software
Add Edge subclass
Karl Wrightc75df440d3d4
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.javaindex 7fc53e89ebf..3071fc82fcb 100644--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java@@ -93,6 +93,29 @@ class GeoComplexPolygon extends GeoBasePolygon {// MHL}+ /**+ * An instance of this class describes a single edge, and includes what is necessary to reliably determine intersection+ * in the context of the even/odd algorithm used.+ */+ private static class Edge {+ public final GeoPoint startPoint;+ public final GeoPoint endPoint;+ public final SidedPlane startPlane;+ public final SidedPlane endPlane;+ public final Plane plane;+ public final XYZBounds planeBounds;++ public Edge(final PlanetModel pm, final GeoPoint startPoint, final GeoPoint endPoint) {+ this.startPoint = startPoint;+ this.endPoint = endPoint;+ this.plane = new Plane(startPoint, endPoint);+ this.startPlane = new SidedPlane(endPoint, plane, startPoint);+ this.endPlane = new SidedPlane(startPoint, plane, endPoint);+ this.planeBounds = new XYZBounds();+ this.plane.recordBounds(pm, this.planeBounds, this.startPlane, this.endPlane);+ }+ }+@Overridepublic boolean equals(Object o) {// MHL