Skip to content
Snippets Groups Projects
Background.cpp 817 B
Newer Older
Postea's avatar
Postea committed
#include "Background.h"
Yoel's avatar
Yoel committed

Postea's avatar
Postea committed
#include <limits>

namespace shapes {
Background::Background(const std::shared_ptr<material::Material>& material)
Yoel's avatar
Yoel committed
    : material(material) {
// TODO TEXELS
Yoel's avatar
Yoel committed
std::optional<cam::Hit> Background::intersect(const cam::Ray& r) const {
	return std::optional<cam::Hit>({r(std::numeric_limits<float>::infinity()),
	                                util::Vec3(0, 0, 0),
	                                {0, 0},
	                                std::numeric_limits<float>::infinity(),
	                                material});
}
// Not used
std::pair<float, float> Background::texture_coordinates(
    const util::Vec3& pos) const {
	return std::pair<float, float>({0, 0});
Postea's avatar
Postea committed
}
Yoel's avatar
Yoel committed
util::AxisAlignedBoundingBox Background::bounds() const {
	return util::AxisAlignedBoundingBox();
}