I need fast 2D raycasting and I am not sure if I could or should use embree for this.
In my project, I already use embree for full 3D raycasting with a mesh. However, I also create slices, polylines in 2D of that mesh where I want to raycast in the plane. As far as I know, embree has no 2D kernels, BVHs etc. and it won't be straight forward to integrate such? In theory, I could create a 3D mesh from the polyline and use 3D rays and for the resulting intersections, ust truncate the z-component. Note that I can't raycast with the original 3D mesh, since the polylines will be processed further before used for raycasting in the 2D plane.
I wonder if this is a good idea at all, or if I should consider other libraries? Keeping dependecy count low is a plus. WIll the performance overhead for using 3D instead of 2D be huge? CGAL's AABB trees for instance are very, very slow compared to embree, but there I can use 2D kenels and true 2D intersection testing. I wouldn't be surprised tho, if embree would still be faster in the end. Any thoughts on this?