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

Function instanceOccludedFuncN

tutorials/lazy_geometry/lazy_geometry_device.cpp:184–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void instanceOccludedFuncN(const RTCOccludedFunctionNArguments* args)
185{
186 const int* valid = args->valid;
187 void* ptr = args->geometryUserPtr;
188 RTCRayQueryContext* context = args->context;
189 RTCRayHitN* rays = (RTCRayHitN*)args->ray;
190 assert(args->N == 1);
191 LazyGeometry* instance = (LazyGeometry*)ptr;
192
193 if (!valid[0])
194 return;
195
196 Ray *ray = (Ray *)rays;
197 /* create the object if it is not yet created */
198 if (instance->state != LAZY_VALID)
199 lazyCreate(instance);
200
201 /* trace ray inside object */
202 RTCOccludedArguments sargs;
203 rtcInitOccludedArguments(&sargs);
204 sargs.context = context;
205 rtcOccluded1(instance->object,RTCRay_(*ray),&sargs);
206}
207
208LazyGeometry* createLazyObject (RTCScene scene, int userID, const Vec3fa& center, const float radius)
209{

Callers

nothing calls this directly

Calls 4

lazyCreateFunction · 0.85
rtcInitOccludedArgumentsFunction · 0.85
rtcOccluded1Function · 0.85
RTCRay_Function · 0.85

Tested by

no test coverage detected