diff options
author | Marius Kintel <marius@kintel.net> | 2013-01-17 14:58:54 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-01-17 14:58:54 (GMT) |
commit | 0b1029ff4d6f17a9f397adbf3f0a011cc20d76a5 (patch) | |
tree | e59dc3c1f4068bb748ebedde54c935a5ab3ef9ca /src/CGAL_Nef_polyhedron.h | |
parent | 8dfc6d71cae370a84e50f4cc7624c05c859a4cea (diff) | |
parent | 20280e88cacc8935de139cd2ce46836beda87e0b (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/CGAL_Nef_polyhedron.h')
-rw-r--r-- | src/CGAL_Nef_polyhedron.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h index e8c505b..d949a2a 100644 --- a/src/CGAL_Nef_polyhedron.h +++ b/src/CGAL_Nef_polyhedron.h @@ -8,12 +8,15 @@ class CGAL_Nef_polyhedron { public: - CGAL_Nef_polyhedron() : dim(0) {} + CGAL_Nef_polyhedron(int dim = 0) : dim(dim) {} CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p); CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p); ~CGAL_Nef_polyhedron() {} - bool empty() const { return (dim == 0 || (!p2 && !p3)); } + // Empty means it is a geometric node which has zero area/volume + bool isEmpty() const { return (dim > 0 && !p2 && !p3); } + // Null means the node doesn't contain any geometry (for whatever reason) + bool isNull() const { return !p2 && !p3; } void reset() { dim=0; p2.reset(); p3.reset(); } CGAL_Nef_polyhedron &operator+=(const CGAL_Nef_polyhedron &other); CGAL_Nef_polyhedron &operator*=(const CGAL_Nef_polyhedron &other); |