public bool IsOccluded(ShadowRay ray) { // TODO use a proper optimized method here that does not compute the actual closest hit. var p = Trace(ray.Ray); bool occluded = p.Mesh != null && p.Distance < ray.MaxDistance; return(occluded); }
/// <summary> /// Checks if the given shadow ray is occluded /// </summary> /// <param name="ray">The shadow ray</param> /// <returns>True if the shadow ray is occluded</returns> public bool IsOccluded(ShadowRay ray) { Debug.Assert(isReady); return(TinyEmbreeCore.IsOccluded(scene, in ray.Ray, ray.MaxDistance)); }