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

Function rtcPointQuery16

kernels/common/rtcore.cpp:571–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 RTC_API bool rtcPointQuery16 (const int* valid, RTCScene hscene, RTCPointQuery16* query, struct RTCPointQueryContext* userContext, RTCPointQueryFunction queryFunc, void** userPtrN)
572 {
573 Scene* scene = (Scene*) hscene;
574 RTC_CATCH_BEGIN;
575 RTC_TRACE(rtcPointQuery16);
576
577#if defined(DEBUG)
578 RTC_VERIFY_HANDLE(hscene);
579 if (scene->isModified()) throw_RTCError(RTC_ERROR_INVALID_OPERATION,"scene got not committed");
580 if (((size_t)valid) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "mask not aligned to 16 bytes");
581 if (((size_t)query) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "query not aligned to 16 bytes");
582#endif
583 STAT(size_t cnt=0; for (size_t i=0; i<4; i++) cnt += ((int*)valid)[i] == -1;);
584 STAT3(point_query.travs,cnt,cnt,cnt);
585
586 bool changed = false;
587 PointQuery16* query16 = (PointQuery16*)query;
588 PointQuery query1;
589 for (size_t i=0; i<16; i++) {
590 if (!valid[i]) continue;
591 PointQuery query1; query16->get(i,query1);
592 changed |= pointQuery(scene, (RTCPointQuery*)&query1, userContext, queryFunc, userPtrN?userPtrN[i]:NULL);
593 query16->set(i,query1);
594 }
595 return changed;
596 RTC_CATCH_END2_FALSE(scene);
597 }
598
599 RTC_API void rtcIntersect1 (RTCScene hscene, RTCRayHit* rayhit, RTCIntersectArguments* args)
600 {

Callers 1

Calls 4

pointQueryFunction · 0.85
isModifiedMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected