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

Wall detection against static world collision. More...

#include "SweptCollision.hpp"
#include "TriMeshCollision.hpp"
#include <cmath>
#include <cstdint>
#include <glm/vec3.hpp>
Include dependency graph for WallDetection.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::WallDetectionResult
 Results of wall detection probes. More...
struct  physics::WallAttachmentResult
 Stable wallrun attachment target on authored triangle meshes. More...

Namespaces

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

Functions

WallDetectionResult physics::detectWalls (glm::vec3 pos, float yaw, glm::vec3 halfExtents, const WorldGeometry &world, float checkDist, float sphereRadius, glm::vec3 prevWallNormal=glm::vec3(0.0f), bool gravityFlipped=false, bool includeGroundDistance=true)
 Detect walls to the left, right, and front of the player.
float physics::probeWallrunGroundDistance (glm::vec3 pos, glm::vec3 halfExtents, const WorldGeometry &world, float sphereRadius, bool gravityFlipped=false)
 Probe only the downward ground distance used by wallrun entry gates.
WallAttachmentResult physics::findWallRunAttachment (CapsuleShape capsule, glm::vec3 pos, const WorldGeometry &world, glm::vec3 continuityNormal, glm::vec3 travelDir=glm::vec3{0.0f}, float lookaheadDist=0.0f, float checkDist=24.0f, uint32_t previousMeshIndex=UINT32_MAX, uint32_t previousTriId=UINT32_MAX, TriRegion previousRegion=TriRegion::Face)
 Find the best triangle-mesh wallrun attachment, with optional lookahead along the current travel direction.
bool physics::isWallNormal (glm::vec3 normal)
 Check if a surface normal represents a wall (not floor/ceiling).

Detailed Description

Wall detection against static world collision.