Hi, all:

I tried to use the ViewFrustum class from org. j3d. The view frustum after
scaled by perspective  projection transformation( inverse) was still a unit
cubic.

I tracked down and found the transformation matrix I got from
canvas.getImagePlateToVworld( transform3D) and transform3D.get(matrix) is
an identity matrix. This check was done right after the scene is initialized.

Could anyone help me to figure out why? What I don't understand is view
frunstum is related to the screen size, real object size and viewer
position. Canvas.getInverseImagePlateToVworld( transform3D) returns the
transformation from image plate to virtual world. But where is the viewer
information coming into play?

Thanks in advance for any comment!

My pseudo code is as follows: The Point3d minCorner, maxCorner I got is
(-1,-1,-1) and (1,1,1)

                 GraphicsDevice screenDevice
=
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
                 GraphicsConfigTemplate3D template = new
GraphicsConfigTemplate3D();
                 GraphicsConfiguration gc =
screenDevice.getBestConfiguration(template);

                 vFstCanvas3D = new Canvas3D( gc )
                 {.....  };

                 simpleU = new SimpleUniverse(getCanvas3D(), 1);

add to Jpanel   setLayout( new BorderLayout() );
                 add( getCanvas3D(), BorderLayout.CENTER );

initialize scene        BranchGroup sceneBranchGroup = createSceneGraph();
                 sceneBranchGroup.compile();
                 simpleU.addBranchGraph( sceneBranchGroup );
         viewFrustum = new ViewFrustum(vFstCanvas3D );
         viewFrustum.viewingPlatformMoved();

                 viewFrustum.getBounds(minCorner, maxCorner);




Lan Wu-Cavener
Dept. of Landscape Architecture

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