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

Function rtcPointQuery8

kernels/common/rtcore.cpp:543–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541 }
542
543 RTC_API bool rtcPointQuery8 (const int* valid, RTCScene hscene, RTCPointQuery8* query, struct RTCPointQueryContext* userContext, RTCPointQueryFunction queryFunc, void** userPtrN)
544 {
545 Scene* scene = (Scene*) hscene;
546 RTC_CATCH_BEGIN;
547 RTC_TRACE(rtcPointQuery8);
548
549#if defined(DEBUG)
550 RTC_VERIFY_HANDLE(hscene);
551 if (scene->isModified()) throw_RTCError(RTC_ERROR_INVALID_OPERATION,"scene got not committed");
552 if (((size_t)valid) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "mask not aligned to 16 bytes");
553 if (((size_t)query) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "query not aligned to 16 bytes");
554#endif
555 STAT(size_t cnt=0; for (size_t i=0; i<4; i++) cnt += ((int*)valid)[i] == -1;);
556 STAT3(point_query.travs,cnt,cnt,cnt);
557
558 bool changed = false;
559 PointQuery8* query8 = (PointQuery8*)query;
560 PointQuery query1;
561 for (size_t i=0; i<8; i++) {
562 if (!valid[i]) continue;
563 query8->get(i,query1);
564 changed |= pointQuery(scene, (RTCPointQuery*)&query1, userContext, queryFunc, userPtrN?userPtrN[i]:NULL);
565 query8->set(i,query1);
566 }
567 return changed;
568 RTC_CATCH_END2_FALSE(scene);
569 }
570
571 RTC_API bool rtcPointQuery16 (const int* valid, RTCScene hscene, RTCPointQuery16* query, struct RTCPointQueryContext* userContext, RTCPointQueryFunction queryFunc, void** userPtrN)
572 {

Callers 1

Calls 4

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

Tested by

no test coverage detected