Raytracer
Loading...
Searching...
No Matches
Plane.hpp
1#include <memory>
2#include "interfaces/IHittable.hpp"
3#include "utils/VecN.hpp"
4
5#ifndef __PLANE_HPP__
6 #define __PLANE_HPP__
7
8namespace Raytracer::Shapes
9{
11 private:
12 Utils::Point3 _point;
13 Utils::Vec3 _normal;
14 std::shared_ptr<Interfaces::IMaterial> _material;
16
17 public:
18 Plane(const Utils::Point3 &point, const Utils::Vec3 &normal,
19 std::shared_ptr<Interfaces::IMaterial> material);
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::Shapes
25#endif /* __PLANE_HPP__ */
Definition Payload.hpp:11
Definition Ray.hpp:9
Definition IHittable.hpp:11
Definition Plane.hpp:10
Plane(const Utils::Point3 &point, const Utils::Vec3 &normal, std::shared_ptr< Interfaces::IMaterial > material)
Construct a new Plane object.
Definition Plane.cpp:16
Utils::AxisAlignedBBox boundingBox() const override
Get the bounding box of the plane.
Definition Plane.cpp:66
bool hit(const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override
Check if the ray hits the plane.
Definition Plane.cpp:36
Definition AxisAlignedBBox.hpp:10
Definition Interval.hpp:9
Definition VecN.hpp:40