Skip to main content

[JAVA3D-INTEREST] retrieving the viewing frustum

3 replies [Last post]
Anonymous

hi everyone,

After searching through the java3D API and the forums, I'm stuck.

I'm trying to get the View Frustum used by the View object of the
ViewPlateform (I get the View from the Canvas3D).
In fact, I need the viewing frustum in the form of 6 oriented half spaces.

I wanted to compute these using the BackClipDistance, the
FrontClipDistance, and so on, but it seems that the FieldOfView is not
always used (depending on the windowEyepointPolicy) so I can't rely on it to
compute the left, right, up and down half spaces anyway.

Anyone having an idea on how to proceed ?

thanks of your help !

Christophe

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mike Pilone

Take a look at j3d.org. There is a Frustum class in the CVS that computes
the frustum by inverting the projection transform and running points through
it.

-mike

> -----Original Message-----
> From: Christophe LOREK [mailto:christophe.lorek@free.fr]
> Sent: Tuesday, November 30, 2004 10:13 AM
> To: interest@java3d.dev.java.net
> Subject: [JAVA3D-INTEREST] retrieving the viewing frustum
>
> hi everyone,
>
> After searching through the java3D API and the forums, I'm stuck.
>
> I'm trying to get the View Frustum used by the View object of the
> ViewPlateform (I get the View from the Canvas3D).
> In fact, I need the viewing frustum in the form of 6 oriented half spaces.
>
> I wanted to compute these using the BackClipDistance, the
> FrontClipDistance, and so on, but it seems that the FieldOfView is not
> always used (depending on the windowEyepointPolicy) so I can't rely on it
> to
> compute the left, right, up and down half spaces anyway.
>
> Anyone having an idea on how to proceed ?
>
> thanks of your help !
>
> Christophe
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Christophe LOREK

hi mike,

thanks for the tip, but I already had a look in the J3D released source code
but couldn't find the Frustum class, maybe the release is not up to date. I
tried to get an up to date version of the code, in the CVS repository but I
keep getting a "connection refused", whereas it's supposed to have an empty
password...
Maybe I've done something wrong with CVS, but I'm not sure...

Is there someone to ask before accessing the CVS server ?

thanks

Christophe

----- Original Message -----
From: "Mike Pilone"
To:
Sent: Tuesday, November 30, 2004 7:17 PM
Subject: RE: [JAVA3D-INTEREST] retrieving the viewing frustum

> Take a look at j3d.org. There is a Frustum class in the CVS that computes
> the frustum by inverting the projection transform and running points
through
> it.
>
> -mike
>
>
> > -----Original Message-----
> > From: Christophe LOREK [mailto:christophe.lorek@free.fr]
> > Sent: Tuesday, November 30, 2004 10:13 AM
> > To: interest@java3d.dev.java.net
> > Subject: [JAVA3D-INTEREST] retrieving the viewing frustum
> >
> > hi everyone,
> >
> > After searching through the java3D API and the forums, I'm stuck.
> >
> > I'm trying to get the View Frustum used by the View object of the
> > ViewPlateform (I get the View from the Canvas3D).
> > In fact, I need the viewing frustum in the form of 6 oriented half
spaces.
> >
> > I wanted to compute these using the BackClipDistance, the
> > FrontClipDistance, and so on, but it seems that the FieldOfView is not
> > always used (depending on the windowEyepointPolicy) so I can't rely on
it
> > to
> > compute the left, right, up and down half spaces anyway.
> >
> > Anyone having an idea on how to proceed ?
> >
> > thanks of your help !
> >
> > Christophe
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> > For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

kcr
Offline
Joined: 2004-03-17

The code that Mike is referring to on j3d.org is part of a separate utility package, not part of j3d-core or j3d-core-utils.

Another alternative is to look at the com.sun.j3d.utils.universe.ViewInfo class, which is part of j3d-core-utils. In particular, the getProjection method should help you.

-- Kevin