mirror of
https://github.com/orange-cpp/omath.git
synced 2026-08-08 14:02:06 +00:00
removed stff
This commit is contained in:
@@ -8,7 +8,12 @@
|
|||||||
|
|
||||||
namespace omath::primitives
|
namespace omath::primitives
|
||||||
{
|
{
|
||||||
enum class UpAxis { X, Y, Z };
|
enum class UpAxis
|
||||||
|
{
|
||||||
|
X,
|
||||||
|
Y,
|
||||||
|
Z
|
||||||
|
};
|
||||||
|
|
||||||
template<class Type, UpAxis Up = UpAxis::Y>
|
template<class Type, UpAxis Up = UpAxis::Y>
|
||||||
struct Aabb final
|
struct Aabb final
|
||||||
@@ -33,7 +38,6 @@ namespace omath::primitives
|
|||||||
return (max - min) / static_cast<Type>(2);
|
return (max - min) / static_cast<Type>(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<UpAxis Up = UpAxis::Y>
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Vector3<Type> top() const noexcept
|
constexpr Vector3<Type> top() const noexcept
|
||||||
{
|
{
|
||||||
@@ -48,7 +52,6 @@ namespace omath::primitives
|
|||||||
std::unreachable();
|
std::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<UpAxis Up = UpAxis::Y>
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Vector3<Type> bottom() const noexcept
|
constexpr Vector3<Type> bottom() const noexcept
|
||||||
{
|
{
|
||||||
@@ -77,8 +80,8 @@ namespace omath::primitives
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr bool is_collide(const Aabb& other) const noexcept
|
constexpr bool is_collide(const Aabb& other) const noexcept
|
||||||
{
|
{
|
||||||
return min.x <= other.max.x && max.x >= other.min.x &&
|
return min.x <= other.max.x && max.x >= other.min.x && min.y <= other.max.y && max.y >= other.min.y
|
||||||
min.y <= other.max.y && max.y >= other.min.y &&min.z <= other.max.z && max.z >= other.min.z;
|
&& min.z <= other.max.z && max.z >= other.min.z;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath::primitives
|
} // namespace omath::primitives
|
||||||
|
|||||||
Reference in New Issue
Block a user