group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
TriMeshCollision.hpp File Reference

Triangle-mesh collision with BVH acceleration. More...

#include "SweptCollision.hpp"
Include dependency graph for TriMeshCollision.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

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

Functions

void physics::buildTriMeshBVH (WorldTriMesh &mesh)
 Build the BVH for a WorldTriMesh.
HitResult physics::sweepAABBvsTriMesh (glm::vec3 halfExtents, glm::vec3 start, glm::vec3 end, const WorldTriMesh &mesh)
 Sweep an AABB against a triangle mesh using BVH-accelerated SAT tests.
void physics::depenetrateAABBvsTriMesh (glm::vec3 &pos, glm::vec3 &vel, glm::vec3 halfExtents, const WorldTriMesh &mesh, float pushback=0.03125f)
 Push an AABB out of a triangle mesh using per-triangle SAT MTV.

Detailed Description

Triangle-mesh collision with BVH acceleration.

Provides a BVH builder (called once at load time) and swept-AABB / raycast / depenetration queries against triangle meshes. The BVH is a flat-array binary tree where each leaf holds up to 4 triangles.