summaryrefslogtreecommitdiff
path: root/src/csgterm.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-25 23:38:03 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-25 23:38:03 (GMT)
commitc4bffdaf37fdf72a84a225ec584d3698fe398857 (patch)
tree503b819d69c00f007709cfee0f332c7adc7ad818 /src/csgterm.h
parent3e64e63b0113a99666ad68aa3e82bb7b80324d9b (diff)
Color overriding now works. The outermost color will win if multiple colors are specified for the same object
Diffstat (limited to 'src/csgterm.h')
-rw-r--r--src/csgterm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/csgterm.h b/src/csgterm.h
index 4930349..570af53 100644
--- a/src/csgterm.h
+++ b/src/csgterm.h
@@ -28,7 +28,7 @@ public:
shared_ptr<CSGTerm> right;
BoundingBox bbox;
- CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const double color[4], const std::string &label);
+ CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const Color4f &color, const std::string &label);
~CSGTerm();
const BoundingBox &getBoundingBox() const { return this->bbox; }
@@ -44,7 +44,7 @@ private:
void initBoundingBox();
Transform3d m;
- double color[4];
+ Color4f color;
friend class CSGChain;
};
@@ -54,13 +54,13 @@ class CSGChain
public:
std::vector<shared_ptr<PolySet> > polysets;
std::vector<Transform3d> matrices;
- std::vector<double*> colors;
+ std::vector<Color4f> colors;
std::vector<CSGTerm::type_e> types;
std::vector<std::string> labels;
CSGChain();
- void add(const shared_ptr<PolySet> &polyset, const Transform3d &m, double *color, CSGTerm::type_e type, std::string label);
+ void add(const shared_ptr<PolySet> &polyset, const Transform3d &m, const Color4f &color, CSGTerm::type_e type, std::string label);
void import(shared_ptr<CSGTerm> term, CSGTerm::type_e type = CSGTerm::TYPE_UNION);
std::string dump();
contact: Jan Huwald // Impressum