This commit is contained in:
Jan Racek
2026-03-27 21:29:01 +01:00
parent 85eb7e59d9
commit bfab154547
42 changed files with 118 additions and 1013 deletions

View File

@@ -33,22 +33,6 @@ struct AABB {
(point.z >= min.z && point.z <= max.z);
}
psyqo::Vec3 center() const {
return psyqo::Vec3{
(min.x + max.x) / 2,
(min.y + max.y) / 2,
(min.z + max.z) / 2
};
}
psyqo::Vec3 halfExtents() const {
return psyqo::Vec3{
(max.x - min.x) / 2,
(max.y - min.y) / 2,
(max.z - min.z) / 2
};
}
void expand(const psyqo::Vec3& delta);
};
static_assert(sizeof(AABB) == 24);
@@ -101,7 +85,6 @@ public:
void clear();
void insert(uint16_t objectIndex, const AABB& bounds);
int queryAABB(const AABB& bounds, uint16_t* output, int maxResults) const;
int getCellIndex(const psyqo::Vec3& pos) const;
private:
Cell m_cells[CELL_COUNT];
@@ -134,13 +117,6 @@ public:
const CollisionResult* getResults() const { return m_results; }
int getResultCount() const { return m_resultCount; }
bool areColliding(uint16_t indexA, uint16_t indexB) const;
bool raycast(const psyqo::Vec3& origin, const psyqo::Vec3& direction,
psyqo::FixedPoint<12> maxDistance,
psyqo::Vec3& hitPoint, psyqo::Vec3& hitNormal,
uint16_t& hitObjectIndex) const;
int getColliderCount() const { return m_colliderCount; }
private: