diff options
author | Marius Kintel <marius@kintel.net> | 2010-04-12 04:57:02 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:35 (GMT) |
commit | 1caf80e561819832092e67bd15ceba5d6f9a02f8 (patch) | |
tree | ac144b7659840529155c762794508bea018b2be3 /src/CGALRenderer.h | |
parent | e8e213b3c9ce0580045ea6e7e86b00ab41d4c58b (diff) |
Added CSGTextCache for experimenting with cache-tree organization
Diffstat (limited to 'src/CGALRenderer.h')
-rw-r--r-- | src/CGALRenderer.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/CGALRenderer.h b/src/CGALRenderer.h index 0492c86..11abaa3 100644 --- a/src/CGALRenderer.h +++ b/src/CGALRenderer.h @@ -1,11 +1,13 @@ #ifndef CGALRENDERER_H_ #define CGALRENDERER_H_ +#include "myqhash.h" + #include <string> #include <map> #include <list> #include "visitor.h" -#include "nodecache.h" +#include "Tree.h" #include "cgal.h" #ifdef ENABLE_CGAL @@ -23,7 +25,7 @@ class CGALRenderer : public Visitor public: enum CsgOp {UNION, INTERSECTION, DIFFERENCE, MINKOWSKI}; // FIXME: If a cache is not given, we need to fix this ourselves - CGALRenderer(QHash<QString, CGAL_Nef_polyhedron> &cache, const NodeCache<string> &dumpcache) : cache(cache), dumpcache(dumpcache) {} + CGALRenderer(QHash<string, CGAL_Nef_polyhedron> &cache, const Tree &tree) : cache(cache), tree(tree) {} virtual ~CGALRenderer() {} virtual Response visit(const State &state, const AbstractNode &node); @@ -38,16 +40,15 @@ public: private: void addToParent(const State &state, const AbstractNode &node); bool isCached(const AbstractNode &node) const; - QString mk_cache_id(const AbstractNode &node) const; void process(CGAL_Nef_polyhedron &target, const CGAL_Nef_polyhedron &src, CGALRenderer::CsgOp op); void applyToChildren(const AbstractNode &node, CGALRenderer::CsgOp op); string currindent; - typedef list<pair<const AbstractNode *, QString> > ChildList; + typedef list<pair<const AbstractNode *, string> > ChildList; map<int, ChildList> visitedchildren; - QHash<QString, CGAL_Nef_polyhedron> &cache; - const NodeCache<string> &dumpcache; + QHash<string, CGAL_Nef_polyhedron> &cache; + const Tree &tree; }; #endif |