From 0dcfce7fb2fe0af7fe3b031d0427ccf7ed40a621 Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Fri, 24 Jan 2025 15:56:35 +0100 Subject: [PATCH] Add operators to AABB --- openVulkanoCpp/Math/AABB.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openVulkanoCpp/Math/AABB.hpp b/openVulkanoCpp/Math/AABB.hpp index 9c68237..6108c9d 100644 --- a/openVulkanoCpp/Math/AABB.hpp +++ b/openVulkanoCpp/Math/AABB.hpp @@ -131,6 +131,10 @@ namespace OpenVulkano::Math } AABB_T& operator +=(const AABB_T& other) { Grow(other); return *this; } + + AABB_T& operator +=(const T& point) { Grow(point); return *this; } + + [[nodiscard]] operator bool() const { return !IsEmpty(); } }; typedef AABB_T AABB;