mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-20 10:23:27 +00:00
added aabb improvemnt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user