computeVisibility
Determine to what extent an occludee is visible (not visible, partially visible, or fully visible).
const sphere1 = new BoundingSphere(new Cartesian3(0, 0, -1.5), 0.5);
const sphere2 = new BoundingSphere(new Cartesian3(0, 0, -2.5), 0.5);
const cameraPosition = new Cartesian3(0, 0, 0);
const occluder = new Occluder(sphere1, cameraPosition);
occluder.computeVisibility(sphere2); //returns Visibility.NONE
Content copied to clipboard
Return
Visibility.NONE if the occludee is not visible, Visibility.PARTIAL if the occludee is partially visible, or Visibility.FULL if the occludee is fully visible.
Parameters
occludeeBS
The bounding sphere of the occludee.