summaryrefslogtreecommitdiff
path: root/src/CGALRenderer.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-07-30 23:58:51 (GMT)
committerMarius Kintel <marius@kintel.net>2011-07-30 23:58:51 (GMT)
commit6882228058d313bb7b98fddd90239bdb1a3e25ef (patch)
tree9e3f0077a319939df7496fc6b18350c44cc4b0ec /src/CGALRenderer.h
parentdd9dfcb4ece4dcd1ae7f3374ef03a4babdb91dd8 (diff)
parentc79ad5010e4ae8a612de5423cd52a518ed6b4d65 (diff)
Merge branch 'master' into visitor
Conflicts: src/GLView.h src/glview.cc src/mainwin.cc src/render-opencsg.cc
Diffstat (limited to 'src/CGALRenderer.h')
-rw-r--r--src/CGALRenderer.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/CGALRenderer.h b/src/CGALRenderer.h
deleted file mode 100644
index 045691a..0000000
--- a/src/CGALRenderer.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef CGALRENDERER_H_
-#define CGALRENDERER_H_
-
-#include "myqhash.h"
-#include "visitor.h"
-#include "Tree.h"
-#include "cgal.h"
-#include "PolySetCGALRenderer.h"
-
-#include <string>
-#include <map>
-#include <list>
-
-extern CGAL_Nef_polyhedron3 minkowski3(CGAL_Nef_polyhedron3 a, CGAL_Nef_polyhedron3 b);
-extern CGAL_Nef_polyhedron2 minkowski2(CGAL_Nef_polyhedron2 a, CGAL_Nef_polyhedron2 b);
-
-using std::string;
-using std::map;
-using std::list;
-using std::pair;
-
-class CGALRenderer : public Visitor
-{
-public:
- enum CsgOp {UNION, INTERSECTION, DIFFERENCE, MINKOWSKI, HULL};
- // FIXME: If a cache is not given, we need to fix this ourselves
- CGALRenderer(QHash<string, CGAL_Nef_polyhedron> &cache, const Tree &tree) : cache(cache), tree(tree), psrenderer(*this) {}
- virtual ~CGALRenderer() {}
-
- virtual Response visit(State &state, const AbstractNode &node);
- virtual Response visit(State &state, const AbstractIntersectionNode &node);
- virtual Response visit(State &state, const CsgNode &node);
- virtual Response visit(State &state, const TransformNode &node);
- virtual Response visit(State &state, const AbstractPolyNode &node);
-
- CGAL_Nef_polyhedron renderCGALMesh(const AbstractNode &node);
- CGAL_Nef_polyhedron renderCGALMesh(const PolySet &polyset);
-
- const Tree &getTree() const { return this->tree; }
-
-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, CGALRenderer::CsgOp op);
- void applyToChildren(const AbstractNode &node, CGALRenderer::CsgOp op);
-
- string currindent;
- typedef list<pair<const AbstractNode *, string> > ChildList;
- map<int, ChildList> visitedchildren;
-
- QHash<string, CGAL_Nef_polyhedron> &cache;
- const Tree &tree;
- PolySetCGALRenderer psrenderer;
-};
-
-#endif
contact: Jan Huwald // Impressum