summaryrefslogtreecommitdiff
path: root/src/csgterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/csgterm.h')
-rw-r--r--src/csgterm.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/csgterm.h b/src/csgterm.h
index 35d071d..2a89ef1 100644
--- a/src/csgterm.h
+++ b/src/csgterm.h
@@ -1,8 +1,9 @@
#ifndef CSGTERM_H_
#define CSGTERM_H_
-#include <QString>
-#include <QVector>
+#include <string>
+#include <vector>
+#include "polyset.h"
class CSGTerm
{
@@ -15,14 +16,15 @@ public:
};
type_e type;
- class PolySet *polyset;
- QString label;
+ PolySet *polyset;
+ std::string label;
CSGTerm *left;
CSGTerm *right;
- double m[20];
+ double m[16];
+ double color[4];
int refcounter;
- CSGTerm(PolySet *polyset, double m[20], QString label);
+ CSGTerm(PolySet *polyset, const double matrix[16], const double color[4], const std::string &label);
CSGTerm(type_e type, CSGTerm *left, CSGTerm *right);
CSGTerm *normalize();
@@ -30,22 +32,25 @@ 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<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(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;
};
#endif
contact: Jan Huwald // Impressum