Visibility Test?

Visibility Test?

Post by Jeffre » Tue, 05 Feb 2002 10:41:02

My current dilema is testing to see whether a 3D object
falls within the viewable area.  I want to test for this
so I can improve the performance of my programs, because
why bother to render objects that won't be visible in the
3D viewing frustrum.  I am programming with DirectX 8.1,
and I have the information about the objects like their
center points, bounding sphere radius, and bounding box
corner locations.  Using this information about the
objects, I hope to test to see whether the object is
within the viewing frustrum or not.  But I cannot find a
function in DirectX 8.1 that would perform a test like
this.  Does anyone know of any functions or methods used
to test for visibility in a viewing frustrum?

I ask this because I know from programming in DirectX 7,
that there is a function to do just that.  The function is
located under the IDirect3DDevice7 object and is called
ComputeSphereVisibility, which would test to see if a
bounding sphere is within the viewing frustrum.  
Unfortunately, DirectX 8 does not have this function,
which confuses does anyone know of what is used
in DirectX 8 to test for visibility in a viewing frustrum.



Visibility Test?

Post by Rich - Microsoft Direct3D M » Tue, 05 Feb 2002 11:08:49

[Please do not mail me a copy of your followup]

Quote:>My current dilema is testing to see whether a 3D object
>falls within the viewable area.

You might want to look at the Cull sample, which does these sorts of
Ask me about my upcoming book on Direct3D from Addison-Wesley!
  Direct3D Book
    Don't Support Spammers!  Boycott Fractal Painter 7!