How to check if object actually visible/shown/drawn in the viewport


I am looking to check if Rhino object (ex. point) is actualy visible or drawn. I mean that it is actually visible and not hidden behind other objects.


Should this be dependent on view Display Mode or not? As first shot I would create line between camera point and target point , and see are there any intersections with other objects, but this may not be very quick.

Maybe @nathanletwory could now something that is already used in rendering engine and would help here.

I myself don’t do any visibility checks, but you probably can use the RayShoot method to determine which object gets hit first for a certain ray. You’d set up rays for each pixel to go from camera in looking direction and create a mapping of which objects are hit first.