diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
commit | f5f06c8e976ca45aebea42fe8c04bf7404357ac8 (patch) | |
tree | 8d0cdd2698e7806c1b12cc49e743b561e1082961 /src/csgterm.h | |
parent | 007c40848db9efd704694f2e7596cabed80da50f (diff) | |
parent | 5ac9162f1c67fd21737ead11d7ebc638bf4eef5f (diff) |
merge
Merge remote branch 'upstream/visitor' into visitortests
Conflicts:
src/export.cc
src/openscad.cc
src/polyset.cc
src/transform.cc
tests/CMakeLists.txt
tests/FindGLEW.cmake
tests/csgtermtest.cc
Diffstat (limited to 'src/csgterm.h')
-rw-r--r-- | src/csgterm.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/csgterm.h b/src/csgterm.h index c1dc0fd..c12b7ae 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -1,9 +1,10 @@ #ifndef CSGTERM_H_ #define CSGTERM_H_ -#include <QString> -#include <QVector> +#include <string> +#include <vector> #include "polyset.h" +#include "memory.h" class CSGTerm { @@ -16,14 +17,15 @@ public: }; type_e type; - PolySet *polyset; - QString label; + shared_ptr<PolySet> polyset; + std::string label; CSGTerm *left; CSGTerm *right; - double m[20]; + double m[16]; + double color[4]; int refcounter; - CSGTerm(PolySet *polyset, const double m[20], QString 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(); @@ -31,22 +33,23 @@ public: CSGTerm *link(); void unlink(); - QString dump(); + std::string dump(); }; class CSGChain { public: - QVector<PolySet*> polysets; - QVector<double*> matrices; - QVector<CSGTerm::type_e> types; - QVector<QString> labels; + std::vector<shared_ptr<PolySet> > polysets; + std::vector<double*> matrices; + std::vector<double*> colors; + std::vector<CSGTerm::type_e> types; + std::vector<std::string> labels; CSGChain(); - void add(PolySet *polyset, double *m, CSGTerm::type_e type, QString 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); - QString dump(); + std::string dump(); BoundingBox getBoundingBox() const; }; |