Re: How to determine whether a Vector is in the View Frustum?
From: Jason (Jason_at_mobiform.com)
Date: Tue, 7 Dec 2004 14:20:17 -0800
device.viewport.near and far, or something close to that.. Ideally you
shouldnt be polling the Device for that kind of thing since it might not be
setup as you might think, or you add something later and change the device
"Kevin Spencer" <email@example.com> wrote in message
>I have finally figured out that I can use Plane.Dot to test whether or not
> vector is in front of the near clipping plane. All I need now is a way to
> reference the near clipping plane. I tried using device.ClipPlanes, but
> apparently that is only a collection of User-defined Clipping planes, as
> errored out on me when I tried to access it.
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Neither a follower
> nor a lender be.
> "Kevin Spencer" <firstname.lastname@example.org> wrote in message
>> 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
>> of that plane. Any ideas?
>> Kevin Spencer
>> .Net Developer
>> Microsoft MVP
>> Neither a follower
>> nor a lender be.
>> "Kevin Spencer" <email@example.com> wrote in message
>> > 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
>> > 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,
>> > is drawing labels for objects that are behind the viewer, as if they
>> > front (as it is drawing on the screen). I need to figure out a way to
>> > whether the vector of the object I'm using is inside the view frustum.
>> > ideas?
>> > --
>> > Thank,
>> > Kevin Spencer
>> > .Net Developer
>> > Microsoft MVP
>> > Neither a follower
>> > nor a lender be.