Template Class RaycasterBase
Defined in File RaycasterBase.hpp
Inheritance Relationships
Derived Types
public lvr2::BVHRaycaster< IntT >(Template Class BVHRaycaster)public lvr2::EmbreeRaycaster< IntT >(Template Class EmbreeRaycaster)
Class Documentation
-
template<typename IntT>
class RaycasterBase RaycasterBase interface.
Subclassed by lvr2::BVHRaycaster< IntT >, lvr2::EmbreeRaycaster< IntT >
Public Functions
-
RaycasterBase(const MeshBufferPtr mesh)
Constructor: Stores mesh as member.
-
virtual bool castRay(const Vector3f &origin, const Vector3f &direction, IntT &intersection) = 0
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
-
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.
- Parameters:
origin – [in] Origin of the ray
directions – [in] Directions of the ray
intersections – [out] User defined intersections output
hits – [out] Intersection found or not
-
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.
- Parameters:
origin – [in] Origin of the ray
directions – [in] Directions of the ray
intersections – [out] User defined intersections output
hits – [out] Intersection found or not
-
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.
- Parameters:
origin – [in] Origin of the ray
directions – [in] Directions of the ray
intersections – [out] User defined intersections output
hits – [out] Intersection found or not
-
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.
- Parameters:
origins – [in] Origins of the rays
directions – [in] Directions for each origin
intersections – [out] Resulting intersections output
hits – [out] Intersection found or not
-
RaycasterBase(const MeshBufferPtr mesh)