Newer
Older

Yoel
committed
#pragma once
#include "../tools/Mat4.h"
#include "../tools/Transformation.h"
#include "LightShape.h"

Yoel
committed
namespace shapes {
class SingleGroup : public Shape, public Light {

Yoel
committed
public:
SingleGroup(const util::Transformation& trans,
std::shared_ptr<LightShape> shape);
SingleGroup(const util::Mat4& matrix, std::shared_ptr<LightShape> shape);

Yoel
committed
std::optional<cam::Hit> intersect(const cam::Ray& r) const override;
util::AxisAlignedBoundingBox bounds() const override;
util::SurfacePoint sampleLight() const override;

Yoel
committed
private:
util::AxisAlignedBoundingBox boundingVolume;
std::shared_ptr<LightShape> shape;

Yoel
committed
util::Transformation transform;
};
} // namespace shapes