fart/util/Color.h
Josh Holtrop c136bda827 added the_Color to Node, material gathering AMBIENT, DIFFUSE, SPECULAR color values
git-svn-id: svn://anubis/fart/trunk@103 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-12 03:07:22 +00:00

36 lines
865 B
C++

#ifndef COLOR_H
#define COLOR_H COLOR_H
#include <iostream>
#include "util/Vector.h"
class Color
{
public:
double r, g, b;
Color();
Color(double r, double g, double b);
Color(const Vector & v);
Color operator*(const Color & other) const;
Color operator*(double scale) const;
Color operator/(double scale) const;
Color & operator+=(const Color & other);
Color & operator-=(const Color & other);
static const Color black;
static const Color white;
static const Color red;
static const Color green;
static const Color blue;
};
Color operator+(const Color & c1, const Color & c2);
Color operator-(const Color & c1, const Color & c2);
std::ostream & operator<<(std::ostream & out, const Color & color);
#endif