changeset 760:6f913badee5d

Fixed intersection test between bounding box and line in vertical octree traversal.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 25 Sep 2018 09:53:59 +0200
parents 46fe2ae761e8
children 033975d49c90
files pkg/octree/tree.go
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/octree/tree.go	Tue Sep 25 08:32:32 2018 +0200
+++ b/pkg/octree/tree.go	Tue Sep 25 09:53:59 2018 +0200
@@ -88,16 +88,16 @@
 			y := a.yi(j)
 			v := p.eval(x, y)
 			if math.Abs(v) < epsPlane {
-				log.Printf("on line")
+				//log.Printf("on line")
 				return true
 			}
-			if s = sides(s, x); s == 3 {
-				log.Printf("... on both sides (djt)")
+			if s = sides(s, v); s == 3 {
+				//log.Printf("... on both sides (djt)")
 				return true
 			}
 		}
 	}
-	log.Printf("side: %d\n", s)
+	//log.Printf("side: %d\n", s)
 	return false
 }