Skip to content
Snippets Groups Projects
ShapeSingleGroup.h 710 B
Newer Older
#pragma once

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

	std::optional<cam::Hit> intersect(const cam::Ray& r) const override;
	std::pair<float, float> texture_coordinates(
	    const util::Vec3& pos) const override;
	util::AxisAlignedBoundingBox bounds() const override;

   private:
	util::AxisAlignedBoundingBox boundingVolume;
	util::Transformation transform;
};
}  // namespace shapes