50 std::span<const WorldAABB>
boxes;
74HitResult
sweepAABB(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, std::span<const Plane> planes);
81HitResult
sweepAABBvsBox(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end,
const WorldAABB& box);
87HitResult
sweepAABBvsBrush(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end,
const WorldBrush& brush);
90HitResult
sweepAll(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end,
const WorldGeometry& world);
113SphereHitResult
sphereCast(
float radius, glm::vec3 start, glm::vec3 end,
const WorldGeometry& world);
Pure physics math — no ECS types, no registry.
Definition Movement.cpp:14
HitResult sweepAll(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldGeometry &world)
Sweep an AABB against all world geometry, returning the earliest hit.
Definition SweptCollision.cpp:197
HitResult sweepAABBvsBox(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldAABB &box)
Sweep an AABB against a static axis-aligned box.
Definition SweptCollision.cpp:58
SphereHitResult sphereCast(float radius, glm::vec3 start, glm::vec3 end, const WorldGeometry &world)
Cast a sphere along the path [start, end] against all world geometry.
Definition SweptCollision.cpp:224
HitResult sweepAABB(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, std::span< const Plane > planes)
Sweep an AABB along the path [start, end] against a list of infinite planes.
Definition SweptCollision.cpp:13
HitResult sweepAABBvsBrush(glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldBrush &brush)
Sweep an AABB against a convex brush (set of bounding planes).
Definition SweptCollision.cpp:133
Result of a swept AABB collision query.
Definition SweptCollision.hpp:56
glm::vec3 normal
Surface normal at the contact point.
Definition SweptCollision.hpp:59
float tFirst
Fraction along the movement path [0..1] where the first hit occurs.
Definition SweptCollision.hpp:58
bool hit
True if the sweep intersected a plane.
Definition SweptCollision.hpp:57
An infinite plane dividing free space from solid geometry.
Definition SweptCollision.hpp:23
glm::vec3 normal
Unit vector pointing into free (non-solid) space.
Definition SweptCollision.hpp:24
float distance
Signed offset: dot(normal, p) == distance for points on the plane.
Definition SweptCollision.hpp:25
Result of a sphere-cast query (includes world-space hit point).
Definition SweptCollision.hpp:96
glm::vec3 point
World-space contact point on the surface.
Definition SweptCollision.hpp:100
bool hit
Definition SweptCollision.hpp:97
float t
Fraction along path [0..1].
Definition SweptCollision.hpp:98
glm::vec3 normal
Surface normal at contact.
Definition SweptCollision.hpp:99
An axis-aligned box in world space, used as static collision geometry.
Definition SweptCollision.hpp:30
glm::vec3 max
Maximum corner (highest x, y, z).
Definition SweptCollision.hpp:32
glm::vec3 min
Minimum corner (lowest x, y, z).
Definition SweptCollision.hpp:31
A convex volume defined by bounding planes (for ramps, angled walls, etc.).
Definition SweptCollision.hpp:40
Plane planes[k_maxPlanes]
Definition SweptCollision.hpp:42
static constexpr int k_maxPlanes
Definition SweptCollision.hpp:41
int planeCount
Definition SweptCollision.hpp:43
All world collision geometry for one tick.
Definition SweptCollision.hpp:48
std::span< const Plane > planes
Definition SweptCollision.hpp:49
std::span< const WorldAABB > boxes
Definition SweptCollision.hpp:50
std::span< const WorldBrush > brushes
Definition SweptCollision.hpp:51