summaryrefslogtreecommitdiff
path: root/transform.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-01 11:09:19 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-01 11:09:19 (GMT)
commit13888cfe9294d1649dff5ea84d5fd76a77182458 (patch)
treea759ce0590a6645d60189aa1664045be2e892956 /transform.cc
parent82fad98cb63d6e27e7c156d4c5e4c9a9847abfd1 (diff)
Clifford Wolf:
Support for hightlights git-svn-id: http://svn.clifford.at/openscad/trunk@45 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'transform.cc')
-rw-r--r--transform.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/transform.cc b/transform.cc
index 687a570..eda8705 100644
--- a/transform.cc
+++ b/transform.cc
@@ -45,7 +45,7 @@ public:
#ifdef ENABLE_CGAL
virtual CGAL_Nef_polyhedron render_cgal_nef_polyhedron() const;
#endif
- virtual CSGTerm *render_csg_term(double m[16]) const;
+ virtual CSGTerm *render_csg_term(double m[16], QVector<CSGTerm*> *highlights) const;
virtual QString dump(QString indent) const;
};
@@ -160,7 +160,7 @@ CGAL_Nef_polyhedron TransformNode::render_cgal_nef_polyhedron() const
#endif /* ENABLE_CGAL */
-CSGTerm *TransformNode::render_csg_term(double c[16]) const
+CSGTerm *TransformNode::render_csg_term(double c[16], QVector<CSGTerm*> *highlights) const
{
double x[16];
@@ -176,13 +176,15 @@ CSGTerm *TransformNode::render_csg_term(double c[16]) const
CSGTerm *t1 = NULL;
foreach(AbstractNode *v, children)
{
- CSGTerm *t2 = v->render_csg_term(x);
+ CSGTerm *t2 = v->render_csg_term(x, highlights);
if (t2 && !t1) {
t1 = t2;
} else if (t2 && t1) {
t1 = new CSGTerm(CSGTerm::UNION, t1, t2);
}
}
+ if (modinst->tag_highlight && highlights)
+ highlights->append(t1->link());
return t1;
}
contact: Jan Huwald // Impressum