mirror of https://github.com/apache/lucene.git
Add Edge subclass
This commit is contained in:
parent
a5e24b213d
commit
c75df440d3
|
@ -93,6 +93,29 @@ class GeoComplexPolygon extends GeoBasePolygon {
|
||||||
// MHL
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
// MHL
|
// MHL
|
||||||
|
|
Loading…
Reference in New Issue