LUCENE-7955: GeoDegeneratePath did not compute endpoint bounding planes properly.

This commit is contained in:
Karl Wright 2017-09-14 10:50:44 -04:00
parent 277bc3a94b
commit c317ad8c1f
1 changed files with 4 additions and 4 deletions

View File

@ -119,20 +119,20 @@ class GeoDegeneratePath extends GeoBasePath {
if (i == 0) {
// Starting endpoint
final SegmentEndpoint startEndpoint = new SegmentEndpoint(currentSegment.start,
new SidedPlane(currentSegment.startCutoffPlane));
currentSegment.startCutoffPlane);
endPoints.add(startEndpoint);
this.edgePoints = new GeoPoint[]{currentSegment.start};
continue;
}
endPoints.add(new SegmentEndpoint(currentSegment.start,
new SidedPlane(segments.get(i-1).endCutoffPlane),
new SidedPlane(currentSegment.startCutoffPlane)));
segments.get(i-1).endCutoffPlane,
currentSegment.startCutoffPlane));
}
// Do final endpoint
final PathSegment lastSegment = segments.get(segments.size()-1);
endPoints.add(new SegmentEndpoint(lastSegment.end,
new SidedPlane(lastSegment.endCutoffPlane)));
lastSegment.endCutoffPlane));
}