diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-11 05:37:14 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-11 05:37:14 (GMT) |
commit | 9afeded46c0e9023002dc04ba6131adcb39762b1 (patch) | |
tree | 0096a12ce36a5b39aa18d7ec5da45c05eb3d42dd /src/csgterm.h | |
parent | b087e68e5430c3dde6adfe452becbaba0f680196 (diff) | |
parent | dc7eeb30d06a928a30ee47a765be3e5a61288d35 (diff) |
Merge branch 'polyset-cleanup' into visitor
Diffstat (limited to 'src/csgterm.h')
-rw-r--r-- | src/csgterm.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/csgterm.h b/src/csgterm.h index 2a89ef1..c12b7ae 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -4,6 +4,7 @@ #include <string> #include <vector> #include "polyset.h" +#include "memory.h" class CSGTerm { @@ -16,7 +17,7 @@ public: }; type_e type; - PolySet *polyset; + shared_ptr<PolySet> polyset; std::string label; CSGTerm *left; CSGTerm *right; @@ -24,7 +25,7 @@ public: double color[4]; int refcounter; - CSGTerm(PolySet *polyset, const double matrix[16], const double color[4], const std::string &label); + CSGTerm(const shared_ptr<PolySet> &polyset, const double matrix[16], const double color[4], const std::string &label); CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); CSGTerm *normalize(); @@ -38,7 +39,7 @@ public: class CSGChain { public: - std::vector<PolySet*> polysets; + std::vector<shared_ptr<PolySet> > polysets; std::vector<double*> matrices; std::vector<double*> colors; std::vector<CSGTerm::type_e> types; @@ -46,7 +47,7 @@ public: CSGChain(); - void add(PolySet *polyset, double *m, double *color, CSGTerm::type_e type, std::string label); + void add(const shared_ptr<PolySet> &polyset, double *m, double *color, CSGTerm::type_e type, std::string label); void import(CSGTerm *term, CSGTerm::type_e type = CSGTerm::TYPE_UNION); std::string dump(); |