Helios++
Helios software for LiDAR simulations
RayUtils Class Reference

Class with util functions to work with rays. More...

#include <RayUtils.h>

Static Public Member Functions

static glm::dvec3 obtainPointAfterTraversing (AABB const &aabb, glm::dvec3 const &origin, glm::dvec3 const &direction, double eps=0.00001)
 Obtain the point immediately after finishing traversing given bounding box, with an offset specified as eps (epsilon) More...
 

Detailed Description

Class with util functions to work with rays.

Author
Alberto M. Esmoris Pena
Version
1.0

Member Function Documentation

◆ obtainPointAfterTraversing()

glm::dvec3 RayUtils::obtainPointAfterTraversing ( AABB const &  aabb,
glm::dvec3 const &  origin,
glm::dvec3 const &  direction,
double  eps = 0.00001 
)
static

Obtain the point immediately after finishing traversing given bounding box, with an offset specified as eps (epsilon)

\[ p = o + (t + \epsilon) \cdot \hat{v} \]

NOTICE this function assumes intersection occurs. Using this function when this assumption is not satisfied might lead to unexpected behaviors and wrong output

Parameters
aabbThe axis aligned bounding box being traversed
originThe originWaypoint of the ray
directionThe direction of the ray
epsThe offset specification. NOTICE if \(\epsilon=0\) then the returned point will be "exactly" the intersection point corresponding to the ray leaving the bounding box
Returns
Point immediately after finishing traversing given bounding box, with eps offset

The documentation for this class was generated from the following files: