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

Implementation of swept-AABB collision detection and response. More...

Include dependency graph for CollisionSystem.cpp:

Namespaces

namespace  systems
 Client-only input sampling system — split into two halves so mouse look can run every iterate() (smooth camera at any FPS) while movement keys run once per physics tick group (server-consistent).

Macros

#define GROUP2_COLLISION_HAS_PARALLEL   0

Functions

static void systems::depenetratePlanes (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, std::span< const physics::Plane > planes)
 Push the entity out of any infinite planes it currently overlaps.
static void systems::depenetrateBox (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldAABB &box)
 Push the entity out of a static AABB it currently overlaps.
static void systems::depenetrateBrush (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldBrush &brush)
 Push the entity out of a convex brush it currently overlaps.
static void systems::depenetrateCylinder (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldCylinder &cyl)
 Push the entity out of a vertical cylinder it currently overlaps.
static void systems::depenetrateSphere (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldSphere &sph)
 Push the entity out of a world sphere it currently overlaps.
static void systems::depenetrateTriMesh (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldTriMesh &mesh)
 Push the entity out of a triangle mesh it currently overlaps.
static bool systems::overlapsAabb (const physics::WorldAABB &a, const physics::WorldAABB &b)
static void systems::depenetrate (glm::vec3 &pos, glm::vec3 &vel, const glm::vec3 &halfExtents, const physics::WorldGeometry &world)
 Run all depenetration passes for legacy AABB bodies.
void systems::runCollision (Registry &registry, float dt, const physics::WorldGeometry &world)
 Run one tick of swept-AABB collision for all physics entities.

Variables

static constexpr float systems::k_pushback = 0.03125f

Detailed Description

Implementation of swept-AABB collision detection and response.

Macro Definition Documentation

◆ GROUP2_COLLISION_HAS_PARALLEL

#define GROUP2_COLLISION_HAS_PARALLEL   0