Raytracer
Loading...
Searching...
No Matches
RotateZ.hpp
1#include "interfaces/IHittable.hpp"
2
3#ifndef __ROTATE_Z_HPP__
4 #define __ROTATE_Z_HPP__
5
6namespace Raytracer::Effects
7{
9 private:
10 std::shared_ptr<Interfaces::IHittable> _object;
11 double _sinTheta;
12 double _cosTheta;
14
15 public:
16 RotateZ(std::shared_ptr<Interfaces::IHittable> object, double angle);
17 bool hit(const Core::Ray &ray, Utils::Interval interval,
18 Core::Payload &payload) const override;
19 Utils::AxisAlignedBBox boundingBox() const override;
20 };
21
22} // namespace Raytracer::Effects
23
24#endif /* __ROTATE_Z_HPP__ */
Definition Payload.hpp:11
Definition Ray.hpp:9
Definition RotateZ.hpp:8
Utils::AxisAlignedBBox boundingBox() const override
Get the bounding box of the rotated object.
Definition RotateZ.cpp:108
RotateZ(std::shared_ptr< Interfaces::IHittable > object, double angle)
Construct a new RotateZ object.
Definition RotateZ.cpp:15
bool hit(const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override
Check if the ray hits the rotated object.
Definition RotateZ.cpp:62
Definition IHittable.hpp:11
Definition AxisAlignedBBox.hpp:10
Definition Interval.hpp:9