diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-23 20:14:12 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-23 20:14:12 (GMT) |
commit | d6efe5cbcb99f7730b47b5945f305f08b5d21b94 (patch) | |
tree | eb429be5acf82a5710d9879dd5fd00b62f1788b7 /src/csgterm.h | |
parent | 87ce149df2581361e8975bd1a0addf2b6ef61e3d (diff) | |
parent | 10c96326866c8256e82f0092a18f4f4e3ca06a74 (diff) |
Merge branch 'master' into boost_filesystem
Conflicts:
tests/CMakeLists.txt
Diffstat (limited to 'src/csgterm.h')
-rw-r--r-- | src/csgterm.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/csgterm.h b/src/csgterm.h index 1895839..4930349 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -18,23 +18,35 @@ public: TYPE_DIFFERENCE }; + static shared_ptr<CSGTerm> createCSGTerm(type_e type, shared_ptr<CSGTerm> left, shared_ptr<CSGTerm> right); + static shared_ptr<CSGTerm> createCSGTerm(type_e type, CSGTerm *left, CSGTerm *right); + type_e type; shared_ptr<PolySet> polyset; std::string label; shared_ptr<CSGTerm> left; shared_ptr<CSGTerm> right; - Transform3d m; - double color[4]; + BoundingBox bbox; CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const double color[4], const std::string &label); - CSGTerm(type_e type, shared_ptr<CSGTerm> left, shared_ptr<CSGTerm> right); - CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); ~CSGTerm(); - static shared_ptr<CSGTerm> normalize(shared_ptr<CSGTerm> &term); - static shared_ptr<CSGTerm> normalize_tail(shared_ptr<CSGTerm> &term); + const BoundingBox &getBoundingBox() const { return this->bbox; } + + static shared_ptr<CSGTerm> normalize(shared_ptr<CSGTerm> term); + static bool normalize_tail(shared_ptr<CSGTerm> &term); std::string dump(); +private: + CSGTerm(type_e type, shared_ptr<CSGTerm> left, shared_ptr<CSGTerm> right); + CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); + + void initBoundingBox(); + + Transform3d m; + double color[4]; + + friend class CSGChain; }; class CSGChain |