36 #ifndef LVR2_ALGORITHM_RAYCASTING_CLRAYCASTER 37 #define LVR2_ALGORITHM_RAYCASTING_CLRAYCASTER 44 #define CL_HPP_ENABLE_EXCEPTIONS 45 #define CL_HPP_MINIMUM_OPENCL_VERSION 120 // Need to set to 120 on CUDA 8 46 #define CL_HPP_TARGET_OPENCL_VERSION 120 // Need to set to 120 on CUDA 8 69 template<
typename IntT>
77 unsigned int stack_size = 32);
107 const std::vector<Vector3f>& directions,
108 std::vector<IntT>& intersections,
109 std::vector<uint8_t>& hits)
override;
121 const std::vector<Vector3f>& origins,
122 const std::vector<Vector3f>& directions,
123 std::vector<IntT>& intersections,
124 std::vector<uint8_t>& hits)
override;
231 #include "CLRaycaster.tcc" 233 #endif // LVR2_ALGORITHM_RAYCASTING_CLRAYCASTER CLRaycaster(const MeshBufferPtr mesh, unsigned int stack_size=32)
Constructor: Generate BVH tree on mesh, loads CL kernels.
std::shared_ptr< MeshBuffer > MeshBufferPtr
bool castRay(const Vector3f &origin, const Vector3f &direction, IntT &intersection)
Overload functions ///.
cl_ulong m_device_global_memory
void initOpenCLBuffer(size_t num_origins, size_t num_dirs)
TODO.
cl::Buffer m_bvhTriIdxListBuffer
cl::Kernel m_kernel_multi_multi
BVHRaycaster: CPU version of BVH Raycasting: WIP.
cl::Kernel m_kernel_one_one
void castRays(const Vector3f &origin, const std::vector< Vector3f > &directions, std::vector< IntT > &intersections, std::vector< uint8_t > &hits) override
Cast a ray from single origin with multiple directions onto the mesh.
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
cl::Buffer m_rayOriginBuffer
void initOpenCLTreeBuffer()
TODO docu.
cl::Buffer m_resultBuffer
CLRaycaster: GPU OpenCL version of BVH Raycasting.
size_t m_max_work_group_size
void initOpenCL()
Initializes OpenCL related stuff.
cl_uint m_threads_per_block
cl::Buffer m_bvhTriangleIntersectionDataBuffer
void getDeviceInformation()
TODO.
cl::Kernel m_kernel_one_multi
cl::Buffer m_bvhLimitsnBuffer
cl::Buffer m_bvhIndicesOrTriListsBuffer
BUFFER ///.