diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-28 18:17:29 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-28 18:17:29 (GMT) |
commit | cc803576dcc4810d1ba415895b83ac9a3079de2f (patch) | |
tree | e5dcee5127de5f867a694e6831b4e0de38b612fd /polyset.cc | |
parent | 8e9b8512367f83e766b1a3676fb326ef216b7e6d (diff) |
Clifford Wolf:
Improved animation and polycaching
git-svn-id: http://svn.clifford.at/openscad/trunk@85 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'polyset.cc')
-rw-r--r-- | polyset.cc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -22,6 +22,8 @@ #include "openscad.h" +QCache<QString,PolySetPtr> PolySet::ps_cache(100); + PolySet::PolySet() { convexity = 1; @@ -323,6 +325,11 @@ CGAL_Nef_polyhedron AbstractPolyNode::render_cgal_nef_polyhedron() const CSGTerm *AbstractPolyNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const { PolySet *ps = render_polyset(RENDER_OPENCSG); + return render_csg_term_from_ps(m, highlights, background, ps, modinst, idx); +} + +CSGTerm *AbstractPolyNode::render_csg_term_from_ps(double m[16], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background, PolySet *ps, const ModuleInstanciation *modinst, int idx) +{ CSGTerm *t = new CSGTerm(ps, m, QString("n%1").arg(idx)); if (modinst->tag_highlight && highlights) highlights->append(t->link()); |