Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
My message does not say you can add your own extension of the Java3D MouseBehavior class. You need to extend the visad.java3d.MouseBehaviorJ3D class. See: http://www.unidata.ucar.edu/glimpse/visad-list/2255 for information about how to use this in the Java2D case (the Java3D case is analogous). Good luck, Bill On Tue, 15 Jan 2002, gaoming fu wrote: > > Hello, All > > I have a MouseRotate class which extends Java3D's MouseBehavior class. > This class > allows users to rotate my 3D image using left mouse within the specified > x and y ranges so that the users can not see the bottom of my image. The > Java3D's MouseRotate class allows users to view the image from any angles > using left mouse, the same for the default VisAD > mouse behavior. Now I want to apply my own MouseRotate class to my > DisplayImplJ3D, i.e., I do not want to use the default mouse behavior of > VisAD. I searched VisAD > email archive and found Bill's message on 26 Jul 1999. So I followed what > Bill said and added the following code to my program: > > DisplayRendererJ3D display_renderer > (DisplayRendererJ3D) display.getDisplayRenderer(); > TransformGroup trans = display_renderer.getTrans(); > if(trans == null) > System.out.println("trans is empty"); > MouseRotate my_mouse = new MouseRotate(); > BoundingSphere bounds > new BoundingSphere(new Point3d(0.0,0.0,0.0), 200000000.0); > my_mouse.setTransformGroup(trans); > my_mouse.setSchedulingBounds(bounds); > > BranchGroup group = new BranchGroup(); > Group.addChild(my_mouse); > trans.addChild(group); > > After I run my program, I still can rotate and zoom the image as before, > i.e., these codes > do not do anything. > > Any help will be highly appreciated. > > Gaoming Fu > > > ________________________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: Click Here > >
visad
archives: