summaryrefslogtreecommitdiff
path: root/src/CGAL_Nef_polyhedron.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-01 02:09:06 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-01 02:09:06 (GMT)
commit1633fb0344c92631562c2a802e8deddf2ce4637f (patch)
treee6e71a9d9a524119db9cc430c5f8409c6839aa9a /src/CGAL_Nef_polyhedron.h
parentc193372d2ff20d32900d72e817e7c9608ae36112 (diff)
Refactoring of CGAL functionality to allow for forward-declaration of CGAL classes in header files, reducing coupling and thus compilation times
Diffstat (limited to 'src/CGAL_Nef_polyhedron.h')
-rw-r--r--src/CGAL_Nef_polyhedron.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h
new file mode 100644
index 0000000..0ab72d7
--- /dev/null
+++ b/src/CGAL_Nef_polyhedron.h
@@ -0,0 +1,31 @@
+#ifndef CGAL_NEF_POLYHEDRON_H_
+#define CGAL_NEF_POLYHEDRON_H_
+
+#ifdef ENABLE_CGAL
+
+#include "cgalfwd.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() {}
+
+ 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);
+ int weight() const;
+ class PolySet *convertToPolyset();
+ class DxfData *convertToDxfData() const;
+
+ int dim;
+ CGAL_Nef_polyhedron2 *p2;
+ CGAL_Nef_polyhedron3 *p3;
+};
+
+#endif /* ENABLE_CGAL */
+
+#endif
contact: Jan Huwald // Impressum