|
group2 0.1.0
CSE 125 Group 2
|
Result of a shape-vs-geometry closest-point clearance query. More...
#include <SweptCollision.hpp>
Public Attributes | |
| bool | contact {false} |
| True when distance <= contactEpsilon. | |
| float | distance {1e30f} |
| Signed distance shape-surface → geometry-surface. | |
| glm::vec3 | pointOnGeometry {0.0f} |
| World-space closest point on the geometry side. | |
| glm::vec3 | normal {0.0f, 1.0f, 0.0f} |
| Unit-length, points from geometry into free space. | |
| SurfaceType | surfaceType {SurfaceType::Concrete} |
| Material tag at the closest feature. | |
Result of a shape-vs-geometry closest-point clearance query.
Used by Phase-C conservative-advancement integration (Mirtich 2000): the CA inner loop alternates closest-point queries with velocity- projected advances, guaranteeing no penetration regardless of motion magnitude. Also consumed by Phase-D wallrun, which uses it to anchor the player to the nearest wall surface across any primitive type.
Sign convention: distance > 0 means the shape's surface is distance away from the geometry's surface in 3D. distance == 0 is grazing contact. distance < 0 is penetration (depth = -distance) — depen handles the recovery; CA treats this as "in contact" and clips velocity into the surface.
normal always points AWAY from the geometry into free space — i.e., pushing the shape along +normal moves it out of the obstacle.
| bool physics::ClearanceResult::contact {false} |
True when distance <= contactEpsilon.
| float physics::ClearanceResult::distance {1e30f} |
Signed distance shape-surface → geometry-surface.
| glm::vec3 physics::ClearanceResult::normal {0.0f, 1.0f, 0.0f} |
Unit-length, points from geometry into free space.
| glm::vec3 physics::ClearanceResult::pointOnGeometry {0.0f} |
World-space closest point on the geometry side.
| SurfaceType physics::ClearanceResult::surfaceType {SurfaceType::Concrete} |
Material tag at the closest feature.