summaryrefslogtreecommitdiff
path: root/src/cgal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgal.h')
-rw-r--r--src/cgal.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/cgal.h b/src/cgal.h
index de942e7..6cbb251 100644
--- a/src/cgal.h
+++ b/src/cgal.h
@@ -45,6 +45,42 @@ struct CGAL_Nef_polyhedron
p3 = p;
}
+ CGAL_Nef_polyhedron& operator+=(const CGAL_Nef_polyhedron &other) {
+ if (other.dim == 2) {
+ this->p2 += other.p2;
+ this->dim = 2;
+ }
+ if (other.dim == 3) {
+ this->p3 += other.p3;
+ this->dim = 3;
+ }
+ return *this;
+ }
+
+ CGAL_Nef_polyhedron& operator*=(const CGAL_Nef_polyhedron &other) {
+ if (other.dim == 2) {
+ this->p2 *= other.p2;
+ this->dim = 2;
+ }
+ if (other.dim == 3) {
+ this->p3 *= other.p3;
+ this->dim = 3;
+ }
+ return *this;
+ }
+
+ CGAL_Nef_polyhedron& operator-=(const CGAL_Nef_polyhedron &other) {
+ if (other.dim == 2) {
+ this->p2 -= other.p2;
+ this->dim = 2;
+ }
+ if (other.dim == 3) {
+ this->p3 -= other.p3;
+ this->dim = 3;
+ }
+ return *this;
+ }
+
int weight() {
if (dim == 2)
return p2.explorer().number_of_vertices();
contact: Jan Huwald // Impressum