> Date:         Tue, 8 May 2001 18:58:54 -0500
> From: alark joshi <[EMAIL PROTECTED]>
>
> 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?

It's not clear to me from your descriptions what you're trying to
accomplish.  You can use the frustum(), perspective(), ortho(), and
lookAt() methods of the Transform3D, but these are designed for use with
the compatibility mode of the View class.

1) Make sure you've called View.setCompatibilityMode(true) on the View
instance that you want to manipulate.

2) Call the View methods setLeftProjection() and setRightProjection() with
the results of frustum(), perspective(), or ortho().  For monoscopic views
only the left projection matrix is used.

3) Call the View method setVpcToEc() with the result of lookAt().

As an alternative to 3), you can set the Transform3D above the ViewPlatform
by inverting the result of lookAt() and using that.  This part may be
confusing to OpenGL programmers since OpenGL's modelview matrix defines the
transform from modeling coordinates to view coordinates, while the
Transform3D that positions and orients the ViewPlatform is part of the
composite transform from ViewPlatform coordinates to VirtualUniverse
coordinates, like any other node in the scene graph.

Don't use the result of frustum() or perspective() in the scene graph, as
all scene graph transforms must be affine.

The OpenGL matrixmode() function doesn't convert projection matrices to
modelview matrices.  It's a switch that allows you to manipulate either the
modelview or projection matrix stacks.

-- Mark Hood

===========================================================================
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".

Reply via email to