Raytracer
Loading...
Searching...
No Matches
DiffuseLight.hpp
1#include <memory>
2#include "interfaces/IMaterial.hpp"
3#include "interfaces/ITexture.hpp"
4
5#ifndef __DIFFUSELIGHT_HPP__
6 #define __DIFFUSELIGHT_HPP__
7
8namespace Raytracer::Materials
9{
11 private:
12 std::shared_ptr<Interfaces::ITexture> _texture;
13
14 public:
15 DiffuseLight(std::shared_ptr<Interfaces::ITexture> texture);
16 DiffuseLight(const Utils::Color &color);
17 bool scatter(const Core::Ray &ray, const Core::Payload &payload,
18 Utils::Color &attenuation, Core::Ray &scattered) const override;
20 double u, double v, const Utils::Point3 &point) const override;
21 };
22} // namespace Raytracer::Materials
23
24#endif /* __DIFFUSELIGHT_HPP__ */
Definition Payload.hpp:11
Definition Ray.hpp:9
Definition IMaterial.hpp:14
Definition DiffuseLight.hpp:10
Utils::Color emitted(double u, double v, const Utils::Point3 &point) const override
Emitted light of the diffuse light material.
Definition DiffuseLight.cpp:68
DiffuseLight(std::shared_ptr< Interfaces::ITexture > texture)
Construct a new DiffuseLight object.
Definition DiffuseLight.cpp:14
bool scatter(const Core::Ray &ray, const Core::Payload &payload, Utils::Color &attenuation, Core::Ray &scattered) const override
Scatter the ray with the diffuse light material.
Definition DiffuseLight.cpp:49
Definition VecN.hpp:40