group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
physics::ClosestPointOnMeshResult Struct Reference

Result of a closest-point-on-mesh query. More...

#include <TriMeshCollision.hpp>

Public Attributes

bool found {false}
float dist {1e30f}
glm::vec3 pointOnSegment {0.0f}
glm::vec3 pointOnMesh {0.0f}
glm::vec3 normal {0.0f, 1.0f, 0.0f}
uint32_t triId {UINT32_MAX}
TriRegion region {TriRegion::Face}

Detailed Description

Result of a closest-point-on-mesh query.

Phase B foundation for the Phase D wallrun manifold walk.

When found is true, dist is the unsigned distance from the query segment to pointOnMesh, which lies in the indicated region of triangle triId. normal is the face normal of that triangle, oriented so it points toward the query segment when the distance is non-zero.

Member Data Documentation

◆ dist

float physics::ClosestPointOnMeshResult::dist {1e30f}

◆ found

bool physics::ClosestPointOnMeshResult::found {false}

◆ normal

glm::vec3 physics::ClosestPointOnMeshResult::normal {0.0f, 1.0f, 0.0f}

◆ pointOnMesh

glm::vec3 physics::ClosestPointOnMeshResult::pointOnMesh {0.0f}

◆ pointOnSegment

glm::vec3 physics::ClosestPointOnMeshResult::pointOnSegment {0.0f}

◆ region

TriRegion physics::ClosestPointOnMeshResult::region {TriRegion::Face}

◆ triId

uint32_t physics::ClosestPointOnMeshResult::triId {UINT32_MAX}

The documentation for this struct was generated from the following file: