I have a scene inside a TransformGroup that allows the mouse to zoom in / rotate / pan.
I need to set the camera position far enough so that I can see the whole scene that I am doing with the following code:
ViewingPlatform viewPlatform = universe.getViewingPlatform();
TransformGroup viewTransform = viewPlatform.getViewPlatformTransform();
Transform3D t3d = new Transform3D();
viewTransform.getTransform(t3d);
t3d.lookAt(new Point3d(0,0,50), new Point3d(0,0,0), new Vector3d(0,1,0));
t3d.invert();
viewTransform.setTransform(t3d);
Executing the above code works in that I can manipulate the scene with the mouse. However, if I change this line:
t3d.lookAt(new Point3d(0,0,50), new Point3d(0,0,0), new Vector3d(0,1,0));
from:
// Change value from 50 to 90 to push the camera back further
t3d.lookAt(new Point3d(0,0,90), new Point3d(0,0,0), new Vector3d(0,1,0));
I lose the ability to manipulate the screen with the mouse.
How can I support the ability to convert with the mouse while pushing the camera away so that I can view the entire screen?
Thank you very much in advance!