add convenient method for bounding box

This commit is contained in:
ohyzha
2024-08-22 13:27:38 +03:00
parent 4fce5fd1de
commit 42e35e6a54

View File

@@ -106,6 +106,11 @@ namespace OpenVulkano::Math
return Math::Utils::all(Math::Utils::greaterThan(min, position)) && Math::Utils::all(Math::Utils::lessThan(position, max));
}
[[nodiscard]] bool IsEmpty() const
{
return min == Math::Vector3f(INFINITY) && max == Math::Vector3f(-INFINITY);
}
/**
* \brief Resets the AABB to min=Inf, max=-Inf, same as Init()
*/