Instead of scaling the scene i would use View.setFieldOfView( ) for perspective
Projection or View.setScreenScale( ) and setScreenScalePolicy( View .
SCALE_EXPLICIT ); for orthogonal projection. Add this method calls  for example
to a ChangeListener of a JSlider or use any other GUI element you like (e.g +,
- button: by pressing + you zoom in with a predefined stepwidth by pressing -
you zoom out).

Paul

Qiu Guojin schrieb:

> hi,
> Now I develope a program and It need zoom in and zoom out.
> I want to use a button to make it zoom in or out when press it.
> But i don't know how to do ,can someone tell me .
> thanks in advance.
>
> I tried to do as following.
> Transform3D mmm ;
> double x=0;
> ....
> if (e.getSource=="button"{
>     mmm.setScale(x);
>     behaviorTrans.setTranslation(mmm);//behaviorTrans is a TransformGroup
> }
>
> Regards
> Qiu Guojin
> -----------------------------------------------------
> Dept. of Technology and Development,
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
> Nanjing, P.R.China
> PHONE: +86+25-6630566-34
> FUJITSU INTERNAL 7995534
> FAX: +86+25-3317685
> -----------------------------------------------------
>
> ===========================================================================
> 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".

===========================================================================
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".

Reply via email to