From 4c9f0ab2ee65cf1c510007a1d8e19f8a9ca76c3b Mon Sep 17 00:00:00 2001 From: ohyzha Date: Mon, 4 Nov 2024 18:23:10 +0200 Subject: [PATCH] ray hit with drawable --- openVulkanoCpp/Scene/Ray.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openVulkanoCpp/Scene/Ray.hpp b/openVulkanoCpp/Scene/Ray.hpp index 080766c..044c14a 100644 --- a/openVulkanoCpp/Scene/Ray.hpp +++ b/openVulkanoCpp/Scene/Ray.hpp @@ -12,6 +12,7 @@ namespace OpenVulkano::Scene { + class Drawable; struct RayHit { @@ -22,6 +23,13 @@ namespace OpenVulkano::Scene bool operator!=(const RayHit& other) const = default; }; + struct DrawableRayHit : RayHit + { + DrawableRayHit() = default; + DrawableRayHit(const RayHit& hit) : RayHit(hit) {}; + Drawable* drawable = nullptr; + }; + class Ray { public: