diff options
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; }; |