diff options
Diffstat (limited to 'src/csgterm.h')
-rw-r--r-- | src/csgterm.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/csgterm.h b/src/csgterm.h index c4e88a6..b09b2d2 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -3,8 +3,10 @@ #include <string> #include <vector> -#include "polyset.h" #include "memory.h" +#include "linalg.h" + +class PolySet; class CSGTerm { @@ -21,11 +23,11 @@ public: std::string label; CSGTerm *left; CSGTerm *right; - double m[16]; + Transform3d m; double color[4]; int refcounter; - CSGTerm(const shared_ptr<PolySet> &polyset, const double matrix[16], const double color[4], const std::string &label); + CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const double color[4], const std::string &label); CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); CSGTerm *normalize(); @@ -40,14 +42,14 @@ class CSGChain { public: std::vector<shared_ptr<PolySet> > polysets; - std::vector<double*> matrices; + std::vector<Transform3d> matrices; std::vector<double*> colors; std::vector<CSGTerm::type_e> types; std::vector<std::string> labels; CSGChain(); - void add(const shared_ptr<PolySet> &polyset, double *m, double *color, CSGTerm::type_e type, std::string label); + 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); std::string dump(); std::string fulldump(); |