MCPcopy Create free account
hub / github.com/RenderKit/embree / rtcForwardIntersect1Ex

Function rtcForwardIntersect1Ex

kernels/common/rtcore.cpp:637–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635 }
636
637 RTC_API void rtcForwardIntersect1Ex(const RTCIntersectFunctionNArguments* args, RTCScene hscene, RTCRay* iray_, unsigned int instID, unsigned int instPrimID)
638 {
639 Scene* scene = (Scene*) hscene;
640 RTC_CATCH_BEGIN;
641 RTC_TRACE(rtcForwardIntersect1Ex);
642#if defined(DEBUG)
643 RTC_VERIFY_HANDLE(hscene);
644 if (scene->isModified()) throw_RTCError(RTC_ERROR_INVALID_OPERATION,"scene not committed");
645 if (((size_t)iray_) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "ray not aligned to 16 bytes");
646#endif
647
648 Ray* iray = (Ray*) iray_;
649 RayHit* oray = (RayHit*)args->rayhit;
650 RTCRayQueryContext* user_context = args->context;
651 const Vec3ff ray_org_tnear = oray->org;
652 const Vec3ff ray_dir_time = oray->dir;
653 oray->org = iray->org;
654 oray->dir = iray->dir;
655 STAT3(normal.travs,1,1,1);
656
657 RTCIntersectArguments* iargs = ((IntersectFunctionNArguments*) args)->args;
658 RayQueryContext context(scene,user_context,iargs);
659
660 instance_id_stack::push(user_context, instID, instPrimID);
661 scene->intersectors.intersect(*(RTCRayHit*)oray,&context);
662 instance_id_stack::pop(user_context);
663
664 oray->org = ray_org_tnear;
665 oray->dir = ray_dir_time;
666
667 RTC_CATCH_END2(scene);
668 }
669
670 RTC_API void rtcIntersect4 (const int* valid, RTCScene hscene, RTCRayHit4* rayhit, RTCIntersectArguments* args)
671 {

Callers 2

rtcForwardIntersect1Function · 0.85

Calls 4

pushFunction · 0.85
popFunction · 0.85
isModifiedMethod · 0.80
intersectMethod · 0.45

Tested by

no test coverage detected