> Date: Tue, 18 Feb 2003 15:53:00 +1000 > From: Jasmine Kwok <[EMAIL PROTECTED]> > > The problem does not only occur when the image is too big/small. It = > could just hang while zooming; I suppose the line = > transformX.set(1+(dy*scale_factor)); > is correct as I tried the suggested line but it shows a sudden zoom in = > into the image..
Are you perhaps ignoring a BadTransformException when calling setTransform() on a TransformGroup? Look for any messages from the JVM indicating that the behavior thread has been killed. It's possible that the expression 1+(dy*scale_factor) could evaluate close enough to 0.0 under some conditions that you're getting a non-affine transformation, which is illegal for a TransformGroup. Also, any transform that has a view platform underneath must have equal scaling across all axes, or you'll get an exception for a non-congruent view transform. BTW, you may want to Math.pow() to construct a proportional zoom for more manageable zooming. That would allow you to have a greater zoom range with much better control at the extremes, and allows your zoom factor to be derived from a linear range centered about 0.0. For example, using Math.pow(2.0, exp) with a linear exponent range of [-10.0 .. +10.0] would give you a range of about a million. -- 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".
