#include <DirectionalLight.hpp>
Definition at line 13 of file DirectionalLight.hpp.
◆ DirectionalLight()
| RayTracer::DirectionalLight::DirectionalLight |
( |
const Math::Vector3D & | direction, |
|
|
float | intensity ) |
◆ getDirection()
◆ illuminate()
Implements RayTracer::ILight.
Definition at line 13 of file DirectionalLight.cpp.
14{
15 (void)point;
16 Color base = object.getBaseColor();
17 return Color(
18 static_cast<int>(std::clamp(base.
r *
_intensity, 0.0f, 255.0f)),
19 static_cast<int>(std::clamp(base.
g *
_intensity, 0.0f, 255.0f)),
20 static_cast<int>(std::clamp(base.
b *
_intensity, 0.0f, 255.0f))
21 );
22}
References _intensity, Color::b, Color::g, and Color::r.
◆ _direction
◆ _intensity
| float RayTracer::DirectionalLight::_intensity |
|
private |
The documentation for this class was generated from the following files: