Newer
Older

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

Yoel
committed
#include "Shape.h"

Yoel
committed
namespace shapes {

Yoel
committed
class ShapeSingleGroup : public Shape {

Yoel
committed
public:

Yoel
committed
ShapeSingleGroup(const util::Transformation& trans,
std::shared_ptr<Shape> shape);
ShapeSingleGroup(const util::Mat4& matrix, std::shared_ptr<Shape> shape);

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

Yoel
committed
util::AxisAlignedBoundingBox bounds() const override;
private:
util::AxisAlignedBoundingBox boundingVolume;

Yoel
committed
std::shared_ptr<Shape> shape;

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