Raytracer
Loading...
Searching...
No Matches
Effects.hpp
1#include "Common.hpp"
2#include "arguments/Kinds.hpp"
3#include "interfaces/IArguments.hpp"
4#include "interfaces/IHittable.hpp"
5#include "interfaces/ITexture.hpp"
6#include "utils/VecN.hpp"
7
8#ifndef __ARG_EFFECTS_HPP__
9 #define __ARG_EFFECTS_HPP__
10
11namespace Raytracer::Arguments
12{
14 private:
15 double _angle;
16 std::shared_ptr<Interfaces::IHittable> _object = nullptr;
17
18 public:
19 RotateX(std::shared_ptr<Interfaces::IHittable> object, double angle)
20 : _angle(angle), _object(object)
21 {
22 }
23 GET_SET(double, angle);
24 GET_SET(std::shared_ptr<Interfaces::IHittable>, object);
25 ARG_KIND(ArgumentKind::ARG_ROTATE_X);
26 };
27
29 private:
30 double _angle;
31 std::shared_ptr<Interfaces::IHittable> _object = nullptr;
32
33 public:
34 RotateY(std::shared_ptr<Interfaces::IHittable> object, double angle)
35 : _angle(angle), _object(object)
36 {
37 }
38 GET_SET(double, angle);
39 GET_SET(std::shared_ptr<Interfaces::IHittable>, object);
40 ARG_KIND(ArgumentKind::ARG_ROTATE_Y);
41 };
42
44 private:
45 double _angle;
46 std::shared_ptr<Interfaces::IHittable> _object = nullptr;
47
48 public:
49 RotateZ(std::shared_ptr<Interfaces::IHittable> object, double angle)
50 : _angle(angle), _object(object)
51 {
52 }
53 GET_SET(double, angle);
54 GET_SET(std::shared_ptr<Interfaces::IHittable>, object);
55 ARG_KIND(ArgumentKind::ARG_ROTATE_Z);
56 };
57
59 private:
60 ArgumentKind _kind;
61 double _density;
62 Utils::Color _color;
63 std::shared_ptr<Interfaces::ITexture> _texture = nullptr;
64 std::shared_ptr<Interfaces::IHittable> _object = nullptr;
65
66 public:
67 Smoke(std::shared_ptr<Interfaces::IHittable> object, double density,
68 Utils::Color color)
69 : _density(density), _color(color), _object(object)
70 {
71 _kind = ArgumentKind::ARG_SMOKE_COLOR;
72 }
73 Smoke(std::shared_ptr<Interfaces::IHittable> object, double density,
74 std::shared_ptr<Interfaces::ITexture> texture)
75 : _density(density), _texture(texture), _object(object)
76 {
77 _kind = ArgumentKind::ARG_SMOKE_TEXTURE;
78 }
79 GET_SET(double, density);
80 GET_SET(Utils::Color, color);
81 GET_SET(std::shared_ptr<Interfaces::ITexture>, texture);
82 GET_SET(std::shared_ptr<Interfaces::IHittable>, object);
83 ARG_KIND(_kind);
84 };
85
87 private:
88 Utils::Vec3 _offset;
89 std::shared_ptr<Interfaces::IHittable> _object = nullptr;
90
91 public:
93 std::shared_ptr<Interfaces::IHittable> object, Utils::Vec3 offset)
94 : _offset(offset), _object(object)
95 {
96 }
97 GET_SET(Utils::Vec3, offset);
98 GET_SET(std::shared_ptr<Interfaces::IHittable>, object);
99 ARG_KIND(ArgumentKind::ARG_TRANSLATE);
100 };
101} // namespace Raytracer::Arguments
102#endif /* __ARG_EFFECTS_HPP__ */
Definition Effects.hpp:13
Definition Effects.hpp:28
Definition Effects.hpp:43
Definition Effects.hpp:58
Definition Effects.hpp:86
Definition IArguments.hpp:8
Definition VecN.hpp:40