2#include "interfaces/IHittable.hpp"
3#include "utils/VecN.hpp"
8namespace Raytracer::Shapes
14 std::shared_ptr<Interfaces::IMaterial> _material;
15 bool _isMoving =
false;
21 std::shared_ptr<Interfaces::IMaterial> material);
23 double radius, std::shared_ptr<Interfaces::IMaterial> material);
Definition Payload.hpp:11
Definition IHittable.hpp:11
Utils::AxisAlignedBBox boundingBox() const override
Get the bounding box of the sphere.
Definition Sphere.cpp:111
static void getSphereUV(const Utils::Point3 &point, double &u, double &v)
Get the UV coordinates of the sphere.
Definition Sphere.cpp:140
Utils::Point3 sphereCenter(double time) const
Get the center of the sphere at the given time.
Definition Sphere.cpp:125
Sphere(const Utils::Point3 ¢er, double radius, std::shared_ptr< Interfaces::IMaterial > material)
Construct a new Sphere object.
Definition Sphere.cpp:17
bool hit(const Core::Ray &ray, Utils::Interval interval, Core::Payload &hit) const override
Check if the ray hits the sphere.
Definition Sphere.cpp:67
Definition AxisAlignedBBox.hpp:10
Definition Interval.hpp:9