Raytracer
Loading...
Searching...
No Matches
Smoke.hpp
1#include "interfaces/IHittable.hpp"
2#include "interfaces/ITexture.hpp"
3
4#ifndef __SMOKE_HPP__
5 #define __SMOKE_HPP__
6
7namespace Raytracer::Effects
8{
9 class Smoke : public Interfaces::IHittable {
10 private:
11 std::shared_ptr<Interfaces::IHittable> _boundary;
12 std::shared_ptr<Interfaces::IMaterial> _phaseFunction;
13 double _density;
14
15 public:
16 Smoke(std::shared_ptr<Interfaces::IHittable> boundary, double density,
17 std::shared_ptr<Interfaces::ITexture> texture);
18 Smoke(std::shared_ptr<Interfaces::IHittable> boundary, double density,
19 const Utils::Color &albedo);
20 bool hit(const Core::Ray &ray, Utils::Interval interval,
21 Core::Payload &payload) const override;
22 Utils::AxisAlignedBBox boundingBox() const override;
23 };
24} // namespace Raytracer::Effects
25
26#endif /* __SMOKE_HPP__ */
Definition Payload.hpp:11
Definition Ray.hpp:9
Definition Smoke.hpp:9
bool hit(const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override
Check if the ray hits the smoke.
Definition Smoke.cpp:63
Smoke(std::shared_ptr< Interfaces::IHittable > boundary, double density, std::shared_ptr< Interfaces::ITexture > texture)
Construct a new Smoke object.
Definition Smoke.cpp:18
Utils::AxisAlignedBBox boundingBox() const override
Get the bounding box of the smoke.
Definition Smoke.cpp:117
Definition IHittable.hpp:11
Definition AxisAlignedBBox.hpp:10
Definition Interval.hpp:9
Definition VecN.hpp:40