From 91d9d9c4b5e4c0b2c1a5a5796eb3b9323710e74b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 22:47:00 +0100 Subject: [PATCH] Added note about tree pruning --- src/csgterm.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/csgterm.cc b/src/csgterm.cc index 49f3dbb5..1b9cb1db 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -81,6 +81,12 @@ shared_ptr CSGTerm::normalize(shared_ptr &term) if (term->type == TYPE_PRIMITIVE) return term; + // FIXME: We can optimize the normalized tree by pruning based on bounding boxes + // as described in the above mentioned paper: + // 1) If the bounding boxes of two intersected nodes don't intersect, prune the + // intersection node + // 2) If the bounding boxes of two subtracted nodes don't intersect, replace the + // difference node with the positive operator do { while (normalize_tail(term)) {} normalize(term->left);