3d line of sight

I would like to determine if a shape is visible from given point (if there is a line from point to shape with no object in middle).

What is the best algoritm for this ? Brute force approximate would be to find siluette of object from given point and cast grid of rays to see if they hit the target. Of course, for any reasonable number of rays it is bound to give errors in some cases.
It might be possible to render target and objects in between to small texture with specific colors and check if there is a pixel with target color in resulting texture. Alternatively, it can be done through stencil. NV_occlusion_query could be probably used here if available.

Both these solutions are quite brute force. Is there any reasonable algoritmic solution for 3d object visibility ? If no, what would be the fastest way to implement 2nd brute force solution, without using NV_occlusion_query ?