Class representing a KDTree ray caster.
More...
#include <KDTreeRaycaster.h>
|
double | epsilon = 0.0001 |
| Decimal precision for the ray caster.
|
|
std::shared_ptr< LightKDTreeNode > | root |
| Shared pointer to the root node of the KDTree.
|
|
Class representing a KDTree ray caster.
- See also
- Raycaster
◆ KDTreeRaycaster()
KDTreeRaycaster::KDTreeRaycaster |
( |
std::shared_ptr< LightKDTreeNode > |
root | ) |
|
|
inline |
KDTree ray caster constructor.
- Parameters
-
root | Root node of the KDTree |
◆ search()
RaySceneIntersection * KDTreeRaycaster::search |
( |
glm::dvec3 const |
rayOrigin, |
|
|
glm::dvec3 const |
rayDir, |
|
|
double const |
tmin, |
|
|
double const |
tmax, |
|
|
bool const |
groundOnly |
|
) |
| |
|
overridevirtual |
◆ search_recursive()
Recursive search function to assist search function.
- Parameters
-
node | KDTree node to be recursively explored |
tmin | Minimum time to intersection. It is used to prevent considering intersections (capturing points) before this time during the recursive search process |
tmax | Maximum time to intersection. It is used to prevent considering intersections (capturing points) after this time during the recursive search process |
search | The 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()
Recursive search function to assist searchAll function.
- Parameters
-
node | KDTree node to be recursively explored |
tmin | Minimum time to intersection. It is used to prevent considering intersections (capturing points) before this time during the recursive search process |
tmax | Maximum time to intersection. It is used to prevent considering intersections (capturing points) after this time during the recursive search process |
search | The KDTreeRaycasterSearch data structure for current search process |
- See also
- KDTreeRaycaster::searchAll
The documentation for this class was generated from the following files: