diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-11 08:51:55 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-11 08:51:55 (GMT) |
commit | 95949cf961d84f65ad9bfb9f2dec7361059ca515 (patch) | |
tree | b5d50e381362d013d8cce12c524571f013a990a2 /src/CGALEvaluator.h | |
parent | 18e97e0bd3f6bda4fdcd17de2a85173ba59b6b00 (diff) |
Implemented CGAL caching
Diffstat (limited to 'src/CGALEvaluator.h')
-rw-r--r-- | src/CGALEvaluator.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/CGALEvaluator.h b/src/CGALEvaluator.h index a8e9844..c1b5ae8 100644 --- a/src/CGALEvaluator.h +++ b/src/CGALEvaluator.h @@ -20,8 +20,7 @@ class CGALEvaluator : public Visitor { public: enum CsgOp {CGE_UNION, CGE_INTERSECTION, CGE_DIFFERENCE, CGE_MINKOWSKI}; - // FIXME: If a cache is not given, we need to fix this ourselves - CGALEvaluator(QHash<string, CGAL_Nef_polyhedron> &cache, const Tree &tree) : cache(cache), tree(tree), psevaluator(*this) {} + CGALEvaluator(const Tree &tree) : tree(tree), psevaluator(*this) {} virtual ~CGALEvaluator() {} virtual Response visit(State &state, const AbstractNode &node); @@ -40,14 +39,13 @@ private: void addToParent(const State &state, const AbstractNode &node); bool isCached(const AbstractNode &node) const; void process(CGAL_Nef_polyhedron &target, const CGAL_Nef_polyhedron &src, CGALEvaluator::CsgOp op); - void applyToChildren(const AbstractNode &node, CGALEvaluator::CsgOp op); - void applyHull(const CgaladvNode &node); + CGAL_Nef_polyhedron applyToChildren(const AbstractNode &node, CGALEvaluator::CsgOp op); + CGAL_Nef_polyhedron applyHull(const CgaladvNode &node); string currindent; typedef list<pair<const AbstractNode *, string> > ChildList; map<int, ChildList> visitedchildren; - QHash<string, CGAL_Nef_polyhedron> &cache; const Tree &tree; public: // FIXME: Do we need to make this visible? Used for cache management |