lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject [18/26] lucene-solr:master: Fix initialization bugs that prevented the code from working.
Date Fri, 29 Apr 2016 00:02:50 GMT
Fix initialization bugs that prevented the code from working.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f896afc8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f896afc8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f896afc8

Branch: refs/heads/master
Commit: f896afc88b36febafa3595c0277e938bbf9ee2e5
Parents: 9dd7921
Author: Karl Wright <DaddyWri@gmail.com>
Authored: Wed Apr 27 17:19:30 2016 -0400
Committer: Karl Wright <DaddyWri@gmail.com>
Committed: Wed Apr 27 17:19:30 2016 -0400

----------------------------------------------------------------------
 .../org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f896afc8/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java
----------------------------------------------------------------------
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.java
index d8c8e75..3a89ee5 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
@@ -864,9 +864,9 @@ class GeoComplexPolygon extends GeoBasePolygon {
         
       this.testPointCutoffPlane = new SidedPlane(thePoint, testPointPlane, testPoint);
       this.checkPointCutoffPlane = new SidedPlane(testPoint, travelPlane, thePoint);
-        
-      this.testPointOtherCutoffPlane = new SidedPlane(testPoint, testPointPlane, intersectionPoint);
-      this.checkPointOtherCutoffPlane = new SidedPlane(thePoint, travelPlane, intersectionPoint);
+
+      this.testPointOtherCutoffPlane = new SidedPlane(testPoint, travelPlane, -(travelPlane.x
* intersectionPoint.x + travelPlane.y * intersectionPoint.y + travelPlane.z * intersectionPoint.z));
+      this.checkPointOtherCutoffPlane = new SidedPlane(thePoint, testPointPlane, -(testPointPlane.x
* intersectionPoint.x + testPointPlane.y * intersectionPoint.y + testPointPlane.z * intersectionPoint.z));
         
       // Figure out which of the above/below planes are inside vs. outside.  To do this,
       // we look for the point that is within the bounds of the testPointPlane and travelPlane.
 The two sides that intersected there are the inside
@@ -882,7 +882,7 @@ class GeoComplexPolygon extends GeoBasePolygon {
       final GeoPoint[] belowAbove = travelBelowPlane.findIntersections(planetModel, testPointAbovePlane,
testPointCutoffPlane, testPointOtherCutoffPlane, checkPointCutoffPlane, checkPointOtherCutoffPlane);
       assert belowAbove != null : "Below + above should not be coplanar";
       
-      assert aboveAbove.length + aboveBelow.length + belowBelow.length + belowAbove.length
== 1 : "Can be exactly one inside point";
+      assert aboveAbove.length + aboveBelow.length + belowBelow.length + belowAbove.length
== 1 : "Can be exactly one inside point, instead was: aa="+aboveAbove.length+" ab=" + aboveBelow.length+"
bb="+ belowBelow.length+" ba=" + belowAbove.length;
       
       final GeoPoint insideIntersection;
       if (aboveAbove.length > 0) {


Mime
View raw message