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

Sphere is now a LightShape and defines all functions of it

parent 723d1844
No related branches found
No related tags found
No related merge requests found
#pragma once
#include "Light.h"
#include "Shape.h"
#include "LightShape.h"
namespace shapes {
class Sphere : public Shape, public Light {
class Sphere : public LightShape {
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;
util::SurfacePoint 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