Helios++
Helios software for LiDAR simulations
KDTreeRaycaster Class Reference

Class representing a KDTree ray caster. More...

#include <KDTreeRaycaster.h>

Inheritance diagram for KDTreeRaycaster:
Collaboration diagram for KDTreeRaycaster:

Classes

class  KDTreeRaycasterSearch
 Data for search operations of KDTree raycaster. More...
 

Public Member Functions

 KDTreeRaycaster (std::shared_ptr< LightKDTreeNode > root)
 KDTree ray caster constructor. More...
 
std::map< double, Primitive * > searchAll (glm::dvec3 const rayOrigin, glm::dvec3 const rayDir, double const tmin, double const tmax, bool const groundOnly) override
 
RaySceneIntersectionsearch (glm::dvec3 const rayOrigin, glm::dvec3 const rayDir, double const tmin, double const tmax, bool const groundOnly) override
 

Public Attributes

double epsilon = 0.0001
 Decimal precision for the ray caster.
 
std::shared_ptr< LightKDTreeNoderoot
 Shared pointer to the root node of the KDTree.
 

Protected Member Functions

void searchAll_recursive (LightKDTreeNode *node, double const tmin, double const tmax, KDTreeRaycasterSearch &search)
 Recursive search function to assist searchAll function. More...
 
Primitivesearch_recursive (LightKDTreeNode *node, double const tmin, double const tmax, KDTreeRaycasterSearch &search) const
 Recursive search function to assist search function. More...
 

Detailed Description

Class representing a KDTree ray caster.

See also
Raycaster

Constructor & Destructor Documentation

◆ KDTreeRaycaster()

KDTreeRaycaster::KDTreeRaycaster ( std::shared_ptr< LightKDTreeNode root)
inline

KDTree ray caster constructor.

Parameters
rootRoot node of the KDTree

Member Function Documentation

◆ search()

RaySceneIntersection * KDTreeRaycaster::search ( glm::dvec3 const  rayOrigin,
glm::dvec3 const  rayDir,
double const  tmin,
double const  tmax,
bool const  groundOnly 
)
overridevirtual

◆ search_recursive()

Primitive * KDTreeRaycaster::search_recursive ( LightKDTreeNode node,
double const  tmin,
double const  tmax,
KDTreeRaycasterSearch search 
) const
protected

Recursive search function to assist search function.

Parameters
nodeKDTree node to be recursively explored
tminMinimum time to intersection. It is used to prevent considering intersections (capturing points) before this time during the recursive search process
tmaxMaximum time to intersection. It is used to prevent considering intersections (capturing points) after this time during the recursive search process
searchThe KDTreeRaycasterSearch data structure for current search process
Returns
Return first found intersection
See also
KDTreeRaycaster::search

◆ searchAll()

map< double, Primitive * > KDTreeRaycaster::searchAll ( glm::dvec3 const  rayOrigin,
glm::dvec3 const  rayDir,
double const  tmin,
double const  tmax,
bool const  groundOnly 
)
overridevirtual

◆ searchAll_recursive()

void KDTreeRaycaster::searchAll_recursive ( LightKDTreeNode node,
double const  tmin,
double const  tmax,
KDTreeRaycasterSearch search 
)
protected

Recursive search function to assist searchAll function.

Parameters
nodeKDTree node to be recursively explored
tminMinimum time to intersection. It is used to prevent considering intersections (capturing points) before this time during the recursive search process
tmaxMaximum time to intersection. It is used to prevent considering intersections (capturing points) after this time during the recursive search process
searchThe KDTreeRaycasterSearch data structure for current search process
See also
KDTreeRaycaster::searchAll

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