# HG changeset patch # User Sascha L. Teichmann # Date 1551708999 -3600 # Node ID 5c3e63cfd50d974c84b736af4739ee0bf6a54d7a # Parent 62adfe9cbbde97180805f238cefa368b2d109551 More counting of clipped nodes. diff -r 62adfe9cbbde -r 5c3e63cfd50d pkg/octree/tree.go --- a/pkg/octree/tree.go Mon Mar 04 14:58:22 2019 +0100 +++ b/pkg/octree/tree.go Mon Mar 04 15:16:39 2019 +0100 @@ -79,13 +79,15 @@ continue frames case IntersectionOutSide: // all outside -> clip from tree. - nodesClipped++ index := ot.index[top.pos:] if len(index) > 8 { index = index[:8] } for i := range index { - index[i] = 0 + if index[i] != 0 { + index[i] = 0 + nodesClipped++ + } } continue frames default: // Overlaps @@ -112,9 +114,14 @@ continue children case IntersectionOutSide: // all are ouside -> clip from tree. - nodesClipped++ - index[i] = 0 - index[i+4] = 0 + if a != 0 { + index[i] = 0 + nodesClipped++ + } + if b != 0 { + index[i+4] = 0 + nodesClipped++ + } continue children default: // Overlaps if a != 0 {