diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-12-07 01:08:51 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-12-07 01:08:51 (GMT) |
commit | 2c90eaa189cd5bc96ef56e89f2841d36f54d0ae2 (patch) | |
tree | 9f732cf3913312bfb99dc79253bef906864c34b5 /src/csgterm.h | |
parent | 750f3c8fc94744d6cc4c62de6ac86595cb2b38b6 (diff) | |
parent | bb0ec94290733835df0716531c30460fc5b5210a (diff) |
Merge remote branch 'upstream/master' into cakebaby
Conflicts:
tests/CMakeLists.txt
tests/csgtestcore.cc
Diffstat (limited to 'src/csgterm.h')
-rw-r--r-- | src/csgterm.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/csgterm.h b/src/csgterm.h index 1d9d9fd..1895839 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -21,20 +21,19 @@ public: type_e type; shared_ptr<PolySet> polyset; std::string label; - CSGTerm *left; - CSGTerm *right; + shared_ptr<CSGTerm> left; + shared_ptr<CSGTerm> right; Transform3d m; double color[4]; - int refcounter; 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(); - CSGTerm *normalize(); - CSGTerm *normalize_tail(); + static shared_ptr<CSGTerm> normalize(shared_ptr<CSGTerm> &term); + static shared_ptr<CSGTerm> normalize_tail(shared_ptr<CSGTerm> &term); - CSGTerm *link(); - void unlink(); std::string dump(); }; @@ -50,7 +49,7 @@ public: CSGChain(); void add(const shared_ptr<PolySet> &polyset, const Transform3d &m, double *color, CSGTerm::type_e type, std::string label); - void import(CSGTerm *term, CSGTerm::type_e type = CSGTerm::TYPE_UNION); + void import(shared_ptr<CSGTerm> term, CSGTerm::type_e type = CSGTerm::TYPE_UNION); std::string dump(); BoundingBox getBoundingBox() const; |