Template Class BVHRaycaster

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

template<typename IntT>
class BVHRaycaster : public lvr2::RaycasterBase<IntT>

BVHRaycaster: CPU version of BVH Raycasting: WIP.

Public Functions

BVHRaycaster(const MeshBufferPtr mesh, unsigned int stack_size)

Constructor: Stores mesh as member.

BVHRaycaster(const MeshBufferPtr mesh)
virtual bool castRay(const Vector3f &origin, const Vector3f &direction, IntT &intersection)

Cast a single ray onto the mesh.

Parameters:
  • origin[in] Ray origin

  • direction[in] Ray direction

  • intersection[out] User defined intersection output

Returns:

true Intersection found

Returns:

false Not intersection found

Protected Functions

inline Vector3f barycentric(const Vector3f &p, const Vector3f &a, const Vector3f &b, const Vector3f &c) const

Protected Attributes

BVHTree<BaseVector<float>> m_bvh
indexArray m_faces
floatArr m_vertices
const unsigned int *m_BVHindicesOrTriLists
const float *m_BVHlimits
const float *m_TriangleIntersectionData
const unsigned int *m_TriIdxList
const unsigned int m_stack_size
struct Ray

Data type to store information about a ray.

Public Members

Vector3f dir
Vector3f invDir
Vector3i rayDirSign
struct TriangleIntersectionResult

A struct to return the calculation results of a triangle intersection.

Public Members

bool hit
unsigned int pBestTriId
Vector3f pointHit
float hitDist