t
Loading...
Searching...
No Matches
AmbientLight.hpp
1#include "lights/Light.hpp"
2#include "primitives/Color.hpp"
3
4#ifndef AMBIENTLIGHT_HPP
5#define AMBIENTLIGHT_HPP
6
7namespace t {
8
26class AmbientLight : public Light {
27public:
29 double intensity;
38 AmbientLight(Color _color, double _intensity)
39 : color(_color), intensity(_intensity) {};
40
50 bool isAmbientLight() const override { return true; }
51};
52
53} // namespace t
54
55#endif // AMBIENTLIGHT_HPP
The ambient light, which illuminates all objects in the scene equally.
Definition AmbientLight.hpp:26
bool isAmbientLight() const override
Returns whether or not this light is an ambient light.
Definition AmbientLight.hpp:50
Color color
The color of this ambient light.
Definition AmbientLight.hpp:28
double intensity
The intensity of this ambient light.
Definition AmbientLight.hpp:29
AmbientLight(Color _color, double _intensity)
Creates a new ambient light with the specified color and intensity.
Definition AmbientLight.hpp:38
The color class.
Definition Color.hpp:18
The base lighting class.
Definition Light.hpp:17
The t software 3D graphics library namespace.
Definition algorithms.hpp:12