changed Scene::calculateLightContribution() to return a Color instead of a double and take into account the color of any semi-transparent objects that are passed through en route to the light source... this leads to shadow colors tainted by the color of the objects through which the light is travelling

git-svn-id: svn://anubis/fart/trunk@211 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2009-03-12 02:30:28 +00:00
1 parent a24452af01
commit 86888fa461
5 files changed
+21 -8

No files matched your search

+8
View File
@@ -79,6 +79,14 @@ Color & Color::operator*=(double scale)
return *this;
}
Color & Color::operator*=(const Color & other)
{
r *= other.r;
g *= other.g;
b *= other.b;
return *this;
}
Color operator+(const Color & c1, const Color & c2)
{
return Color(c1.r + c2.r, c1.g + c2.g, c1.b + c2.b);
+1
View File
@@ -22,6 +22,7 @@ class Color
Color & operator+=(const Color & other);
Color & operator-=(const Color & other);
Color & operator*=(double scale);
Color & operator*=(const Color & other);
static const Color black;
static const Color white;