Re: How to determine whether a Vector is in the View Frustum?

From: Kevin Spencer (kspencer_at_takempis.com)
Date: 12/07/04


Date: Tue, 7 Dec 2004 11:36:00 -0500

Okay, I've figured out that if the Z element of the vector is behind ( < )
the near clipping plane, I shouldn't render the text. However, although I
know the value used to set the near clipping plane, I don't know the Z-value
of that plane. Any ideas?

-- 
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:ONWXFUH3EHA.3616@TK2MSFTNGP11.phx.gbl...
> I'm working on a terrain-modelling app. I"m drawing labels for objects
> directly on the screen. I use the Vector3.Project() method to determine
the
> position of the label on the screen. I'm checking the XY values of the
> returned Vector to make sure that the text is inside the screen area, but
it
> is drawing labels for objects that are behind the viewer, as if they were
in
> front (as it is drawing on the screen). I need to figure out a way to tell
> whether the vector of the object I'm using is inside the view frustum. Any
> ideas?
>
> -- 
> Thank,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Neither a follower
> nor a lender be.
>
>


Relevant Pages