> Date: Tue, 27 Nov 2001 11:18:33 +0100 > From: Gianni Riccio <[EMAIL PROTECTED]> > > 1)I add to my code three classes(MouseRotate,Zoom and Translate) and after > rotation or zooming or translation I would to reset the initial view.How can > I do this?
There is no built-in way to do this with the mouse behaviors. You need to save the initial transform explicitly and restore it. Each of the mouse behaviors has an empty transformChanged() method that you can override so you can be notified of each new transform; this will allow you to implement an arbitrary undo stack. You can also register a callback with each of the behaviors to do the same thing. In Java 3D 1.3 beta1 the abstract ViewPlatformBehavior utility class has new methods setHomeTransform() and goHome() to allow you to set a "reset" view. The OrbitBehavior utility is a subclass, so you can get this functionality by using OrbitBehavior instead. > 2)How can I move by KeyboardNavigatorBehavior in my scene very slowly? Use the Shift and Meta keys to dynamically change the velocity, rotation, and scaling factors. With no modifiers: velocity and rotation have factors of 1.0 and scale has a 4.0 factor. With Meta: velocity, rotation, and scale all have factors of 0.1 instead. With Shift: velocity, rotation, and scale have factors of 3.0, 2.0, and 4.0 respectively. With Shift+Meta: velocity, rotation, and scale have factors of 0.3, 0.5, and 0.1 respectively. -- Mark Hood =========================================================================== 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".