diff --git a/RayTracer/shape/Sphere.h b/RayTracer/shape/Sphere.h index 91961a4db7287122b6b1f839e78de09f22db4b5a..73edcc2a9d12a20799d69102b9c21f63c7bff657 100644 --- a/RayTracer/shape/Sphere.h +++ b/RayTracer/shape/Sphere.h @@ -1,14 +1,17 @@ #pragma once -#include "LightShape.h" +#include "Light.h" +#include "Shape.h" namespace shapes { -class Sphere : public LightShape { +class Sphere : public Light, public Shape { public: Sphere(float radius, const std::shared_ptr<material::Material>& material); std::optional<cam::Hit> intersect(const cam::Ray& r) const override; util::AxisAlignedBoundingBox bounds() const override; util::SurfacePoint sampleLight() const override; + util::Vec3 calculateLightEmission(const util::SurfacePoint& p, + const util::Vec3& d) const override; private: std::shared_ptr<material::Material> material;