Implement instance translation

This commit is contained in:
CJSatnarine
2024-07-11 00:08:36 -04:00
parent f42d13bbd7
commit efea1517a7

8
aabb.h
View File

@@ -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