using Color instead of Vector where appropriate, updated main/Light to use diffuse and specular lights
git-svn-id: svn://anubis/fart/trunk@67 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
08a0047ba8
commit
f087488b39
8 files changed
+55
-22
No files matched your search
@@ -29,6 +29,20 @@ Color Color::operator/(double scale)
|
||||
return Color(r / scale, g / scale, b / scale);
|
||||
}
|
||||
|
||||
Color & Color::operator+=(const Color & other)
|
||||
{
|
||||
r += other.r;
|
||||
g += other.g;
|
||||
b += other.b;
|
||||
}
|
||||
|
||||
Color & Color::operator-=(const Color & other)
|
||||
{
|
||||
r += other.r;
|
||||
g += other.g;
|
||||
b += other.b;
|
||||
}
|
||||
|
||||
Color operator+(const Color & c1, const Color & c2)
|
||||
{
|
||||
return Color(c1.r + c2.r, c1.g + c2.g, c1.b + c2.b);
|
||||
|
||||
@@ -12,6 +12,8 @@ class Color
|
||||
|
||||
Color operator*(double scale);
|
||||
Color operator/(double scale);
|
||||
Color & operator+=(const Color & other);
|
||||
Color & operator-=(const Color & other);
|
||||
|
||||
static const Color black;
|
||||
static const Color white;
|
||||
|
||||
Reference in new issue
Block a user