diff options
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 |