feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef AABB_H
#define AABB_H
#pragma once
#include "core/math/plane.h"
#include "core/math/vector3.h"
@ -59,10 +58,15 @@ struct [[nodiscard]] AABB {
const Vector3 &get_size() const { return size; }
void set_size(const Vector3 &p_size) { size = p_size; }
bool operator==(const AABB &p_rval) const;
bool operator!=(const AABB &p_rval) const;
constexpr bool operator==(const AABB &p_rval) const {
return position == p_rval.position && size == p_rval.size;
}
constexpr bool operator!=(const AABB &p_rval) const {
return position != p_rval.position || size != p_rval.size;
}
bool is_equal_approx(const AABB &p_aabb) const;
bool is_same(const AABB &p_aabb) const;
bool is_finite() const;
_FORCE_INLINE_ bool intersects(const AABB &p_aabb) const; /// Both AABBs overlap
_FORCE_INLINE_ bool intersects_inclusive(const AABB &p_aabb) const; /// Both AABBs (or their faces) overlap
@ -129,8 +133,8 @@ struct [[nodiscard]] AABB {
operator String() const;
_FORCE_INLINE_ AABB() {}
inline AABB(const Vector3 &p_pos, const Vector3 &p_size) :
AABB() = default;
constexpr AABB(const Vector3 &p_pos, const Vector3 &p_size) :
position(p_pos),
size(p_size) {
}
@ -496,4 +500,5 @@ AABB AABB::quantized(real_t p_unit) const {
return ret;
}
#endif // AABB_H
template <>
struct is_zero_constructible<AABB> : std::true_type {};