mouse behavior

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);

BranchGroup group = new BranchGroup();

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