charles/src/light.hh

46 lines
837 B
C++

/* light.hh
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
#ifndef __LIGHT_H__
#define __LIGHT_H__
#include "basics/basics.hh"
namespace charles {
struct Light
{
Light(const basics::Color& color,
const Double& intensity = 1.0);
basics::Color& GetColor();
const basics::Color& GetColor() const;
void SetColor(basics::Color& color);
Double GetIntensity() const;
void SetIntensity(const Double& intensity);
basics::Color&& Contribution() const;
private:
Double ClampIntensity(const Double& intensity);
/** The color of the light. */
basics::Color mColor;
/**
* The intensity of the light. Normal values range from 0.0 to 1.0, but
* they can be set higher.
*/
Double mIntensity;
};
typedef Light AmbientLight;
} /* namespace charles */
#endif