diff options
Diffstat (limited to 'modules/raycast/static_raycaster_embree.cpp')
-rw-r--r-- | modules/raycast/static_raycaster_embree.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/raycast/static_raycaster_embree.cpp b/modules/raycast/static_raycaster_embree.cpp index f9076d30dd..a6ad340397 100644 --- a/modules/raycast/static_raycaster_embree.cpp +++ b/modules/raycast/static_raycaster_embree.cpp @@ -53,9 +53,12 @@ void StaticRaycasterEmbree::free() { } bool StaticRaycasterEmbree::intersect(Ray &r_ray) { - RTCIntersectContext context; - rtcInitIntersectContext(&context); - rtcIntersect1(embree_scene, &context, (RTCRayHit *)&r_ray); + RTCRayQueryContext context; + rtcInitRayQueryContext(&context); + RTCIntersectArguments args; + rtcInitIntersectArguments(&args); + args.context = &context; + rtcIntersect1(embree_scene, (RTCRayHit *)&r_ray, &args); return r_ray.geomID != RTC_INVALID_GEOMETRY_ID; } |