Helper that can generate information on a raycaster internal data: BVH visualisation, etc.
More...
#include <RaycasterVisualisation.hpp>
|
|
const Raycaster & | _raycaster |
| | The raycaster to visualise.
|
| |
Helper that can generate information on a raycaster internal data: BVH visualisation, etc.
◆ RaycasterVisualisation()
| RaycasterVisualisation::RaycasterVisualisation |
( |
const Raycaster & |
raycaster | ) |
|
|
explicit |
Constructor.
- Parameters
-
| raycaster | the raycaster about which to provide visualisation |
◆ createBVHMeshes()
| void RaycasterVisualisation::createBVHMeshes |
( |
const std::vector< DisplayNode > & |
nodes, |
|
|
std::vector< Mesh > & |
meshes |
|
) |
| const |
|
private |
Generate geometry for a subset of the bounding volume hierarchy as a series of bounding boxes.
- Parameters
-
| nodes | the nodes to generate geometry for |
| meshes | will be filled with the geometry of each depth level |
◆ getAllLevels()
| void RaycasterVisualisation::getAllLevels |
( |
std::vector< Mesh > & |
meshes | ) |
const |
Generate geometry to visualize each level of the bounding volume hierarchy as a series of bounding boxes.
- Parameters
-
| meshes | will be filled with the geometry of each depth level |
◆ getRayLevels()
| Raycaster::Hit RaycasterVisualisation::getRayLevels |
( |
const glm::vec3 & |
origin, |
|
|
const glm::vec3 & |
direction, |
|
|
std::vector< Mesh > & |
meshes, |
|
|
float |
mini = 0.0001f, |
|
|
float |
maxi = 1e8f |
|
) |
| const |
Cast a ray and generate geometry for all intersected nodes at each level of the bounding volume hierarchy as a series of bounding boxes.
- Parameters
-
| origin | ray origin |
| direction | ray direction (not necessarily normalized) |
| meshes | will be filled with the geometry of each depth level |
| mini | the minimum distance allowed for the intersection |
| maxi | the maximum distance allowed for the intersection |
- Returns
- a hit object containg the potential hit informations
◆ getRayMesh()
| void RaycasterVisualisation::getRayMesh |
( |
const glm::vec3 & |
rayPos, |
|
|
const glm::vec3 & |
rayDir, |
|
|
const Raycaster::Hit & |
hit, |
|
|
Mesh & |
mesh, |
|
|
float |
defaultLength = 10000.0f |
|
) |
| const |
Generate a mesh representing a ray and the intersected triangle.
- Parameters
-
| rayPos | the ray origin |
| rayDir | the ray direction( will be normalized) |
| hit | the ray hit |
| mesh | will be filled with the ray and triangle geometry |
| defaultLength | the length of the ray when no collision happened |
The documentation for this class was generated from the following files: