summaryrefslogtreecommitdiff
path: root/module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'module.cc')
-rw-r--r--module.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/module.cc b/module.cc
index ea59a08..a28dd39 100644
--- a/module.cc
+++ b/module.cc
@@ -249,19 +249,23 @@ CGAL_Nef_polyhedron AbstractNode::render_cgal_nef_polyhedron() const
#endif /* ENABLE_CGAL */
-CSGTerm *AbstractNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights) const
+CSGTerm *AbstractNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const
{
CSGTerm *t1 = NULL;
foreach(AbstractNode *v, children) {
- CSGTerm *t2 = v->render_csg_term(m, highlights);
+ CSGTerm *t2 = v->render_csg_term(m, highlights, background);
if (t2 && !t1) {
t1 = t2;
} else if (t2 && t1) {
t1 = new CSGTerm(CSGTerm::UNION, t1, t2);
}
}
- if (modinst->tag_highlight && highlights)
+ if (t1 && modinst->tag_highlight && highlights)
highlights->append(t1->link());
+ if (t1 && modinst->tag_background && background) {
+ background->append(t1);
+ return NULL;
+ }
return t1;
}
contact: Jan Huwald // Impressum