From efea1517a7c6517c6501cfd5f72d15324315832a Mon Sep 17 00:00:00 2001 From: CJSatnarine Date: Thu, 11 Jul 2024 00:08:36 -0400 Subject: [PATCH] Implement instance translation --- aabb.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aabb.h b/aabb.h index 7feae3b..1dabab2 100644 --- a/aabb.h +++ b/aabb.h @@ -82,4 +82,12 @@ class aabb { const aabb aabb::empty = aabb(interval::empty, interval::empty, interval::empty); const aabb aabb::universe = aabb(interval::universe, interval::universe, interval::universe); +aabb operator+(const aabb& bBox, const vec3& offset) { + return aabb(bBox.x + offset.x(), bBox.y + offset.y(), bBox.z + offset.z()); +} + +aabb operator+(const vec3& offset, const aabb& bBox) { + return bBox + offset; +} + #endif \ No newline at end of file