On Fri, 15 Oct 1999 06:41:01 -0700, Dong-Woo Lee wrote:
>I want to the following transformations:
>
> Change Locatioin -> Rotation -> Changel Scale
Hi,
you have to apply the transforms from left to right, in order to get "right" results
in rotation. calculations depend on what you intend to do and cannot
be described more exactly therefor.
A simple example to let rotate an object around its local y-axis:
Transform3D currenTrans = new Transform3D();
transformGroup.getTransform(currentTrans);
currentTrans
Transform3D inverse = new Transform3D(currentTrans);
//rotation
Transform3D yRot = new Transform3D();
yRot.rotY(y_angle);
inverse.mul(yRot, inverse);
inverse.mul(currentTrans, inverse);
//translation
Transform3D translation = new Transform3D();
translation.set(new Vector3f(x, y, z)); //x, y, z vector from actual position
inverse.mul(translation, inverse);
//scaling
invesre.scale(...);
//apply transforms
transformGroup.setTransform(inverse);
Gernot
[EMAIL PROTECTED]
http://www.janet.de
===========================================================================
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".