class Light
{
private:
+ enum ParameterMask
+ {
+ DIFFUSE = 1,
+ SPECULAR = 2,
+ POSITION = 4,
+ SPOT_DIR = 8,
+ SPOT_EXP = 16,
+ SPOT_CUTOFF = 32,
+ ATTENUATION = 64
+ };
+
Color diffuse;
Color specular;
Vector4 position;
public:
Light();
+private:
+ void update_parameter(int, int = -1) const;
+
+public:
void set_diffuse(const Color &c);
void set_specular(const Color &c);
const Color &get_diffuse() const { return diffuse; }