Hi,
I have the right values for the Projection View and it shows the
perspective projection. But, I can now just change the view by changing
the Transform3D object. It would be of great help if I could use either of
frustum() or perspective(). I read up in an openGL book about these
functions and there exist matrixmode() methods to convert Projection
matrix to model view. What can i do in j3d?
thanks a lot,
Alark
On Tue, 8 May 2001, J. Lee Dixon wrote:
> You are attempting to apply a "projection matrix" to a "model view
> matrix". The transforms applied in TransformGroups are referred to as
> "modelview" transforms because they merely place objects in the virtual
> world coordinate system. Once all the objects are placed, they are all
> run through the current "projection" transform.
>
> Take a look at the View class (which controls the projection transform),
> specifically at View.setProjectionPolicy(),
> View.setLeftProjection(Transform3D) and
> View.setRightProjection(Transform3D).
>
>
> The API docs for BadTransformException say:
>
> * Transforms that are used in the scene graph, within a TransformGroup
> node, must be affine. (snip)
> (snip)
> * The projection transform is allowed to be non-affine, but it must
> either be a single point perspective projection or a parallel
> projection. (snip)
>
> The first bullet applies to you since you are attempting to use a
> perspective projection transform (non-affine) in a TransformGroup.
>
> -Lee
>
> > -----Original Message-----
> > From: alark joshi [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 08, 2001 7:02 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JAVA3D] Problems with Perspective Projection
> >
> >
> > Hi,
> > I am working on a mathematical model which I have represented
> > in Java3D. I
> > am able to view the model using lookAt() and ortho(). But if I use
> > perspective() or frustum() on the same Transform3D object, it
> > gives me the
> > following error. I tried changing the object to a simple Cube, but it
> > still gives me this error.
> >
> > Exception in thread
> > "main" javax.media.j3d.BadTransformException: TransformGroup:
> > non-affine
> > transform at
> > javax.media.j3d.TransformGroup.setTransform(TransformGroup.java:108)
> >
> >
> > I have no idea why this is happening. According to the error
> > description
> > in the API, it should not give an error if I am using perspective
> > projection to one point (which is exactly what I am doing).
> >
> > Please could you let me know what might be the problem.
> > Thanks a lot,
> > Alark Joshi
> >
> > ==============================================================
> > =============
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body
> > of the message "signoff JAVA3D-INTEREST". For general help,
> > send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".