Skip to content
Snippets Groups Projects
SingleGroup.h 685 B
Newer Older
#pragma once

#include "../tools/Mat4.h"
#include "../tools/Transformation.h"
class SingleGroup : public Shape, public Light {
   public:
	SingleGroup(const util::Transformation& trans,
	            std::shared_ptr<LightShape> shape);
	SingleGroup(const util::Mat4& matrix, std::shared_ptr<LightShape> shape);

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

	util::SurfacePoint sampleLight() const override;

   private:
	util::AxisAlignedBoundingBox boundingVolume;
	std::shared_ptr<LightShape> shape;
	util::Transformation transform;
};
}  // namespace shapes