From f8bacb2dcecbee2c05b4b6b4ad72f43afb793935 Mon Sep 17 00:00:00 2001 From: Yoel <s73017@beuth-hochschule.de> Date: Sun, 14 Feb 2021 15:27:09 +0100 Subject: [PATCH] New Shape-method which takes position and calcs the uvs depending on the shape --- RayTracer/shape/Shape.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RayTracer/shape/Shape.h b/RayTracer/shape/Shape.h index d4f0e70..2a3c3e4 100644 --- a/RayTracer/shape/Shape.h +++ b/RayTracer/shape/Shape.h @@ -10,6 +10,8 @@ namespace shapes { class Shape { public: 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; }; } // namespace shapes \ No newline at end of file -- GitLab