added aabb improvemnt

This commit is contained in:
2026-04-19 23:07:58 +03:00
parent 20930c629a
commit dfd18e96fb
3 changed files with 196 additions and 37 deletions

View File

@@ -24,5 +24,11 @@ namespace omath::primitives
{
return (max - min) / static_cast<Type>(2);
}
[[nodiscard]]
constexpr bool is_collide(const Aabb& other) const noexcept
{
return min.x <= other.max.x && max.x >= other.min.x &&
min.y <= other.max.y && max.y >= other.min.y &&min.z <= other.max.z && max.z >= other.min.z;
}
};
} // namespace omath::primitives