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

Method occluded

kernels/common/accelset.h:175–202  ·  view source on GitHub ↗

! Tests if single ray is occluded by the scene. */

Source from the content-addressed store, hash-verified

173
174 /*! Tests if single ray is occluded by the scene. */
175 __forceinline bool occluded (Ray& ray, unsigned int geomID, unsigned int primID, RayQueryContext* context)
176 {
177 assert(primID < size());
178
179 int mask = -1;
180 OccludedFunctionNArguments args;
181 args.valid = &mask;
182 args.geometryUserPtr = userPtr;
183 args.context = context->user;
184 args.ray = (RTCRayN*)&ray;
185 args.N = 1;
186 args.geomID = geomID;
187 args.primID = primID;
188 args.geometry = this;
189 args.forward_scene = nullptr;
190 args.args = context->args;
191
192 OccludedFuncN occludedFunc = nullptr;
193 occludedFunc = intersectorN.occluded;
194
195 if (context->getOccludedFunction())
196 occludedFunc = context->getOccludedFunction();
197
198 assert(occludedFunc);
199 occludedFunc(&args);
200
201 return mask != 0;
202 }
203
204 /*! Intersects a single ray with the scene. */
205 __forceinline bool intersect (RayHit& ray, unsigned int geomID, unsigned int primID, RayQueryContext* context, RTCScene& forward_scene)

Callers

nothing calls this directly

Calls 3

getOccludedFunctionMethod · 0.80
sizeFunction · 0.70
mask32Method · 0.45

Tested by

no test coverage detected