group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
SweptCollision.cpp File Reference

Implementation of swept AABB and sphere collision queries. More...

#include "SweptCollision.hpp"
#include "TriMeshCollision.hpp"
#include <algorithm>
#include <cmath>
#include <glm/geometric.hpp>
Include dependency graph for SweptCollision.cpp:

Namespaces

namespace  physics
 Pure physics math — no ECS types, no registry.

Functions

HitResult physics::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.
HitResult physics::sweepAABBvsBox (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldAABB &box)
 Sweep an AABB against a static axis-aligned box.
HitResult physics::sweepAABBvsBrush (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldBrush &brush)
 Sweep an AABB against a convex brush (set of bounding planes).
HitResult physics::sweepAABBvsCylinder (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldCylinder &cyl)
 Sweep an AABB against a vertical cylinder.
HitResult physics::sweepAABBvsSphere (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldSphere &sph)
 Sweep an AABB against a sphere.
HitResult physics::sweepAll (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldGeometry &world)
 Sweep an AABB against all world geometry, returning the earliest hit.
SphereHitResult physics::sphereCast (float radius, glm::vec3 start, glm::vec3 end, const WorldGeometry &world)
 Cast a sphere along the path [start, end] against all world geometry.

Detailed Description

Implementation of swept AABB and sphere collision queries.