summaryrefslogtreecommitdiff
path: root/src/csgterm.cc
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.cc
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.cc')
-rw-r--r--src/csgterm.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/csgterm.cc b/src/csgterm.cc
index 56fcbb5..890b0c9 100644
--- a/src/csgterm.cc
+++ b/src/csgterm.cc
@@ -89,10 +89,9 @@ shared_ptr<CSGTerm> CSGTerm::createCSGTerm(type_e type, CSGTerm *left, CSGTerm *
return createCSGTerm(type, shared_ptr<CSGTerm>(left), shared_ptr<CSGTerm>(right));
}
-CSGTerm::CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const double color[4], const std::string &label)
- : type(TYPE_PRIMITIVE), polyset(polyset), label(label), m(matrix)
+CSGTerm::CSGTerm(const shared_ptr<PolySet> &polyset, const Transform3d &matrix, const Color4f &color, const std::string &label)
+ : type(TYPE_PRIMITIVE), polyset(polyset), label(label), m(matrix), color(color)
{
- for (int i = 0; i < 4; i++) this->color[i] = color[i];
initBoundingBox();
}
@@ -281,7 +280,7 @@ CSGChain::CSGChain()
{
}
-void CSGChain::add(const shared_ptr<PolySet> &polyset, const Transform3d &m, double *color, CSGTerm::type_e type, std::string label)
+void CSGChain::add(const shared_ptr<PolySet> &polyset, const Transform3d &m, const Color4f &color, CSGTerm::type_e type, std::string label)
{
polysets.push_back(polyset);
matrices.push_back(m);
contact: Jan Huwald // Impressum