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

Function rtcPointQuery4

kernels/common/rtcore.cpp:515–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513 }
514
515 RTC_API bool rtcPointQuery4 (const int* valid, RTCScene hscene, RTCPointQuery4* query, struct RTCPointQueryContext* userContext, RTCPointQueryFunction queryFunc, void** userPtrN)
516 {
517 Scene* scene = (Scene*) hscene;
518 RTC_CATCH_BEGIN;
519 RTC_TRACE(rtcPointQuery4);
520
521#if defined(DEBUG)
522 RTC_VERIFY_HANDLE(hscene);
523 if (scene->isModified()) throw_RTCError(RTC_ERROR_INVALID_OPERATION,"scene got not committed");
524 if (((size_t)valid) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "mask not aligned to 16 bytes");
525 if (((size_t)query) & 0x0F) throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "query not aligned to 16 bytes");
526#endif
527 STAT(size_t cnt=0; for (size_t i=0; i<4; i++) cnt += ((int*)valid)[i] == -1;);
528 STAT3(point_query.travs,cnt,cnt,cnt);
529
530 bool changed = false;
531 PointQuery4* query4 = (PointQuery4*)query;
532 PointQuery query1;
533 for (size_t i=0; i<4; i++) {
534 if (!valid[i]) continue;
535 query4->get(i,query1);
536 changed |= pointQuery(scene, (RTCPointQuery*)&query1, userContext, queryFunc, userPtrN?userPtrN[i]:NULL);
537 query4->set(i,query1);
538 }
539 return changed;
540 RTC_CATCH_END2_FALSE(scene);
541 }
542
543 RTC_API bool rtcPointQuery8 (const int* valid, RTCScene hscene, RTCPointQuery8* query, struct RTCPointQueryContext* userContext, RTCPointQueryFunction queryFunc, void** userPtrN)
544 {

Callers 1

Calls 4

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

Tested by

no test coverage detected