diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-06 10:48:51 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-06 10:48:51 (GMT) |
commit | 2ff53c89ce5c1e30d6f001fdd4361b8fcad36e82 (patch) | |
tree | 3b4607c9e49d5eb53859086a6299dffbae5f67ca /openscad.h | |
parent | 6575732286d3f8909972d3705b748c6cfc02f8a8 (diff) |
Clifford Wolf:
Added caching of messages along wioth synthesis products
git-svn-id: http://svn.clifford.at/openscad/trunk@215 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.h')
-rw-r--r-- | openscad.h | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -63,7 +63,6 @@ class Module; class Context; class PolySet; -class PolySetPtr; class CSGTerm; class CSGChain; class AbstractNode; @@ -559,7 +558,14 @@ public: CSGMODE_HIGHLIGHT_DIFFERENCE = 22 }; - static QCache<QString,PolySetPtr> ps_cache; + struct ps_cache_entry { + PolySet *ps; + QString msg; + ps_cache_entry(PolySet *ps); + ~ps_cache_entry(); + }; + + static QCache<QString,ps_cache_entry> ps_cache; void render_surface(colormode_e colormode, csgmode_e csgmode, GLint *shaderinfo = NULL) const; void render_edges(colormode_e colormode, csgmode_e csgmode) const; @@ -573,18 +579,6 @@ public: void unlink(); }; -class PolySetPtr -{ -public: - PolySet *ps; - PolySetPtr(PolySet *ps) { - this->ps = ps; - } - ~PolySetPtr() { - ps->unlink(); - } -}; - class CSGTerm { public: @@ -647,7 +641,12 @@ public: virtual ~AbstractNode(); virtual QString mk_cache_id() const; #ifdef ENABLE_CGAL - static QCache<QString, CGAL_Nef_polyhedron> cgal_nef_cache; + struct cgal_nef_cache_entry { + CGAL_Nef_polyhedron N; + QString msg; + cgal_nef_cache_entry(CGAL_Nef_polyhedron N); + }; + static QCache<QString, cgal_nef_cache_entry> cgal_nef_cache; virtual CGAL_Nef_polyhedron render_cgal_nef_polyhedron() const; #endif virtual CSGTerm *render_csg_term(double m[16], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const; |