Hello friends,
I am having problems with mouse zooming.
when i am zooming , my object is going out of the bounding sphere , where i cant see my image.
So can any one tell me or correct me how to set a fixed zoom(max and min zoom) , so that my object doesn't go out of the bounding sphere.
In the fallowing coding you can find out what i am doing at present ...
So please correct my misitakes in the fallowing code or give me any suggestions.
public ObjLoad(String args[])
{
setLayout(new BorderLayout());
GraphicsConfiguration config =
SimpleUniverse.getPreferredConfiguration();
GraphicsConfiguration config =
SimpleUniverse.getPreferredConfiguration();
Canvas3D c = new Canvas3D(config );
add( "Center", c);
BranchGroup scene = createSceneGraph(args);
u = new SimpleUniverse(c);
add( "Center", c);
BranchGroup scene = createSceneGraph(args);
u = new SimpleUniverse(c);
ViewingPlatform viewingPlatform = u.getViewingPlatform();
viewingPlatform.setNominalViewingTransform();
if (!spin) {
OrbitBehavior orbit = new OrbitBehavior(c,
OrbitBehavior.REVERSE_ALL);
BoundingSphere bounds =
new BoundingSphere(new Point3d(0.0 0.0, 0.0), 100.0);
orbit.setSchedulingBounds(bounds);
viewingPlatform.setViewPlatformBehavior(orbit);
}
OrbitBehavior orbit = new OrbitBehavior(c,
OrbitBehavior.REVERSE_ALL);
BoundingSphere bounds =
new BoundingSphere(new Point3d(0.0 0.0, 0.0), 100.0);
orbit.setSchedulingBounds(bounds);
viewingPlatform.setViewPlatformBehavior(orbit);
}
u.addBranchGraph(scene);
}
}
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses. =========================================================================== 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".