Added note about tree pruning

felipesanches-svg
Marius Kintel 2011-12-21 22:47:00 +01:00
parent 51c28e8a5b
commit 91d9d9c4b5
1 changed files with 6 additions and 0 deletions

View File

@ -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);