35 #ifndef LVR2_ALGORITHM_RAYCASTING_EMBREERAYCASTER 36 #define LVR2_ALGORITHM_RAYCASTING_EMBREERAYCASTER 38 #include <embree3/rtcore.h> 50 template<
typename IntT>
80 rayhit.ray.org_x = origin.x();
81 rayhit.ray.org_y = origin.y();
82 rayhit.ray.org_z = origin.z();
83 rayhit.ray.dir_x = direction.x();
84 rayhit.ray.dir_y = direction.y();
85 rayhit.ray.dir_z = direction.z();
87 rayhit.ray.tfar = INFINITY;
90 rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID;
91 rayhit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;
102 #include "EmbreeRaycaster.tcc" 104 #endif // LVR2_ALGORITHM_RAYCASTING_EMBREERAYCASTER
std::shared_ptr< MeshBuffer > MeshBufferPtr
bool castRay(const Vector3f &origin, const Vector3f &direction, IntT &intersection)
Cast a single ray onto the mesh.
RTCScene initializeScene(RTCDevice device, const MeshBufferPtr mesh)
RTCIntersectContext m_context
RTCRayHit lvr2embree(const Vector3f &origin, const Vector3f &direction) const
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
RTCDevice initializeDevice()
EmbreeRaycaster(const MeshBufferPtr mesh)
KF_EXPORTS void error(const char *error_string, const char *file, const int line, const char *func="")
Error handler. All GPU functions from this subsystem call the function to report an error...
void EmbreeErrorFunction(void *userPtr, enum RTCError error, const char *str)