Skip to content
Snippets Groups Projects
Commit 70efd9cb authored by Yoel's avatar Yoel
Browse files

Sphere is now a light which its defined functions

parent 921f274f
No related branches found
No related tags found
No related merge requests found
#pragma once
#include "Light.h"
#include "Shape.h"
namespace shapes {
class Sphere : public Shape {
class Sphere : public Shape, public Light {
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;
cam::Hit sampleLight() const override;
private:
std::shared_ptr<material::Material> material;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment