Raytracer
Loading...
Searching...
No Matches
Translate.hpp
1#include "interfaces/IHittable.hpp"
2#include "utils/AxisAlignedBBox.hpp"
3#include "utils/VecN.hpp"
4
5#ifndef __TRANSLATE_HPP__
6 #define __TRANSLATE_HPP__
7
8namespace Raytracer::Effects
9{
11 private:
12 std::shared_ptr<Interfaces::IHittable> _object;
13 Utils::Vec3 _offset;
15
16 public:
17 Translate(std::shared_ptr<Interfaces::IHittable> object,
18 const Utils::Vec3 &offset);
19 bool hit(const Core::Ray &ray, Utils::Interval interval,
20 Core::Payload &payload) const override;
21 Utils::AxisAlignedBBox boundingBox() const override;
22 };
23} // namespace Raytracer::Effects
24
25#endif /* __TRANSLATE_HPP__ */
Definition Payload.hpp:11
Definition Ray.hpp:9
Definition Translate.hpp:10
Utils::AxisAlignedBBox boundingBox() const override
Get the bounding box of the translated object.
Definition Translate.cpp:58
Translate(std::shared_ptr< Interfaces::IHittable > object, const Utils::Vec3 &offset)
Construct a new Translate object.
Definition Translate.cpp:14
bool hit(const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override
Check if the ray hits the translated object.
Definition Translate.cpp:35
Definition IHittable.hpp:11
Definition AxisAlignedBBox.hpp:10
Definition Interval.hpp:9
Definition VecN.hpp:40