Public Member Functions | Private Attributes | List of all members
lvr2::RaycasterBase< IntT > Class Template Referenceabstract

RaycasterBase interface. More...

#include <RaycasterBase.hpp>

Inheritance diagram for lvr2::RaycasterBase< IntT >:
Inheritance graph
[legend]

Public Member Functions

virtual bool castRay (const Vector3f &origin, const Vector3f &direction, IntT &intersection)=0
 Cast a single ray onto the mesh. More...
 
virtual void castRays (const Vector3f &origin, const std::vector< Vector3f > &directions, std::vector< IntT > &intersections, std::vector< uint8_t > &hits)
 Cast a ray from single origin with multiple directions onto the mesh. More...
 
virtual void castRays (const Vector3f &origin, const std::vector< std::vector< Vector3f > > &directions, std::vector< std::vector< IntT > > &intersections, std::vector< std::vector< uint8_t > > &hits)
 Cast a ray from a single origin with multiple directions (in matrix form) onto the mesh. More...
 
virtual void castRays (const std::vector< Vector3f > &origins, const std::vector< Vector3f > &directions, std::vector< IntT > &intersections, std::vector< uint8_t > &hits)
 Cast from multiple ray origin/direction pairs onto the mesh. More...
 
virtual void castRays (const std::vector< Vector3f > &origins, const std::vector< std::vector< Vector3f > > &directions, std::vector< std::vector< IntT > > &intersections, std::vector< std::vector< uint8_t > > &hits)
 Cast rays with multiples origins. Each origin has multiples directions. More...
 
 RaycasterBase (const MeshBufferPtr mesh)
 Constructor: Stores mesh as member. More...
 

Private Attributes

const MeshBufferPtr m_mesh
 

Detailed Description

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

RaycasterBase interface.

Definition at line 53 of file RaycasterBase.hpp.

Constructor & Destructor Documentation

◆ RaycasterBase()

template<typename IntT >
lvr2::RaycasterBase< IntT >::RaycasterBase ( const MeshBufferPtr  mesh)

Constructor: Stores mesh as member.

Member Function Documentation

◆ castRay()

template<typename IntT >
virtual bool lvr2::RaycasterBase< IntT >::castRay ( const Vector3f origin,
const Vector3f direction,
IntT &  intersection 
)
pure virtual

Cast a single ray onto the mesh.

Parameters
[in]originRay origin
[in]directionRay direction
[out]intersectionUser defined intersection output
Returns
true Intersection found
false Not intersection found

Implemented in lvr2::CLRaycaster< IntT >, lvr2::BVHRaycaster< IntT >, and lvr2::EmbreeRaycaster< IntT >.

◆ castRays() [1/4]

template<typename IntT >
virtual void lvr2::RaycasterBase< IntT >::castRays ( const Vector3f origin,
const std::vector< Vector3f > &  directions,
std::vector< IntT > &  intersections,
std::vector< uint8_t > &  hits 
)
virtual

Cast a ray from single origin with multiple directions onto the mesh.

Parameters
[in]originOrigin of the ray
[in]directionsDirections of the ray
[out]intersectionsUser defined intersections output
[out]hitsIntersection found or not

Reimplemented in lvr2::CLRaycaster< IntT >.

◆ castRays() [2/4]

template<typename IntT >
virtual void lvr2::RaycasterBase< IntT >::castRays ( const Vector3f origin,
const std::vector< std::vector< Vector3f > > &  directions,
std::vector< std::vector< IntT > > &  intersections,
std::vector< std::vector< uint8_t > > &  hits 
)
virtual

Cast a ray from a single origin with multiple directions (in matrix form) onto the mesh.

Parameters
[in]originOrigin of the ray
[in]directionsDirections of the ray
[out]intersectionsUser defined intersections output
[out]hitsIntersection found or not

◆ castRays() [3/4]

template<typename IntT >
virtual void lvr2::RaycasterBase< IntT >::castRays ( const std::vector< Vector3f > &  origins,
const std::vector< Vector3f > &  directions,
std::vector< IntT > &  intersections,
std::vector< uint8_t > &  hits 
)
virtual

Cast from multiple ray origin/direction pairs onto the mesh.

Parameters
[in]originOrigin of the ray
[in]directionsDirections of the ray
[out]intersectionsUser defined intersections output
[out]hitsIntersection found or not

Reimplemented in lvr2::CLRaycaster< IntT >.

◆ castRays() [4/4]

template<typename IntT >
virtual void lvr2::RaycasterBase< IntT >::castRays ( const std::vector< Vector3f > &  origins,
const std::vector< std::vector< Vector3f > > &  directions,
std::vector< std::vector< IntT > > &  intersections,
std::vector< std::vector< uint8_t > > &  hits 
)
virtual

Cast rays with multiples origins. Each origin has multiples directions.

Parameters
[in]originsOrigins of the rays
[in]directionsDirections for each origin
[out]intersectionsResulting intersections output
[out]hitsIntersection found or not

Member Data Documentation

◆ m_mesh

template<typename IntT >
const MeshBufferPtr lvr2::RaycasterBase< IntT >::m_mesh
private

Definition at line 143 of file RaycasterBase.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:12