diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-21 21:47:00 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-21 21:47:00 (GMT) |
commit | 91d9d9c4b5e4c0b2c1a5a5796eb3b9323710e74b (patch) | |
tree | 2395e020bd25202634ad5b46b4daf1d2097bd566 /src/csgterm.cc | |
parent | 51c28e8a5ba7a3d4897389498e0a2aa606e78cf9 (diff) |
Added note about tree pruning
Diffstat (limited to 'src/csgterm.cc')
-rw-r--r-- | src/csgterm.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/csgterm.cc b/src/csgterm.cc index 49f3dbb..1b9cb1d 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -81,6 +81,12 @@ shared_ptr<CSGTerm> CSGTerm::normalize(shared_ptr<CSGTerm> &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); |