summaryrefslogtreecommitdiff
path: root/src/CGAL_Nef_polyhedron.h
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2011-09-12 22:40:51 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2011-09-12 22:40:51 (GMT)
commitf5f06c8e976ca45aebea42fe8c04bf7404357ac8 (patch)
tree8d0cdd2698e7806c1b12cc49e743b561e1082961 /src/CGAL_Nef_polyhedron.h
parent007c40848db9efd704694f2e7596cabed80da50f (diff)
parent5ac9162f1c67fd21737ead11d7ebc638bf4eef5f (diff)
merge
Merge remote branch 'upstream/visitor' into visitortests Conflicts: src/export.cc src/openscad.cc src/polyset.cc src/transform.cc tests/CMakeLists.txt tests/FindGLEW.cmake tests/csgtermtest.cc
Diffstat (limited to 'src/CGAL_Nef_polyhedron.h')
-rw-r--r--src/CGAL_Nef_polyhedron.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h
new file mode 100644
index 0000000..79d36b7
--- /dev/null
+++ b/src/CGAL_Nef_polyhedron.h
@@ -0,0 +1,34 @@
+#ifndef CGAL_NEF_POLYHEDRON_H_
+#define CGAL_NEF_POLYHEDRON_H_
+
+#ifdef ENABLE_CGAL
+
+#include "cgalfwd.h"
+#include "memory.h"
+
+class CGAL_Nef_polyhedron
+{
+public:
+ CGAL_Nef_polyhedron() : dim(0) {}
+ CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p) : dim(2), p2(p) {}
+ CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p) : dim(3), p3(p) {}
+ ~CGAL_Nef_polyhedron() {}
+
+ bool empty() const { return (dim == 0 || (!p2 && !p3)); }
+ CGAL_Nef_polyhedron &operator+=(const CGAL_Nef_polyhedron &other);
+ CGAL_Nef_polyhedron &operator*=(const CGAL_Nef_polyhedron &other);
+ CGAL_Nef_polyhedron &operator-=(const CGAL_Nef_polyhedron &other);
+ CGAL_Nef_polyhedron &minkowski(const CGAL_Nef_polyhedron &other);
+ CGAL_Nef_polyhedron copy() const;
+ int weight() const;
+ class PolySet *convertToPolyset();
+ class DxfData *convertToDxfData() const;
+
+ int dim;
+ shared_ptr<CGAL_Nef_polyhedron2> p2;
+ shared_ptr<CGAL_Nef_polyhedron3> p3;
+};
+
+#endif /* ENABLE_CGAL */
+
+#endif
contact: Jan Huwald // Impressum