Skip to content
Snippets Groups Projects
Shape.h 428 B
Newer Older
Postea's avatar
Postea committed
#pragma once
Yoel's avatar
Yoel committed
#include <optional>

#include "../camera/Hit.h"
#include "../camera/Ray.h"
Yoel's avatar
Yoel committed
#include "../tools/AxisAlignedBoundingBox.h"
Postea's avatar
Postea committed

namespace shapes {
class Shape {
Yoel's avatar
Yoel committed
   public:
Yoel's avatar
Yoel committed
	virtual std::optional<cam::Hit> intersect(const cam::Ray& r) const = 0;
	virtual std::pair<float, float> texture_coordinates(
	    const util::Vec3& pos) const = 0;
	virtual util::AxisAlignedBoundingBox bounds() const = 0;
Yoel's avatar
Yoel committed
}  // namespace shapes