Fiasco:

I also struggled with the same problem.  The following link may be useful to
you:
 http://www.et.byu.edu/~ered/ME537/Read_HW_Labs/ch1-537.pdf
"If we postmultiply a transformation representing a frame (relative to base
axes)
by a second transformation (relative to the frame of the first
transformation),
we make the transformation with respect to the frame axes of the first
transformation.
Premultiplying the frame transformation by the second transformation causes
the
transformation to be made with respect to the base reference frame." (Pg 9
of above link).

I found it amazing that, XYZ world coordinates rotation is equivalent to ZYX
local coordinates rotation. In code something like this?
        Matrix3d rotationMatrixX = new Matrix3d();
        Matrix3d rotationMatrixY = new Matrix3d();
        Matrix3d rotationMatrixZ = new Matrix3d();
        rotationMatrixX.rotX(rotateX);
        rotationMatrixY.rotY(rotateY);
        rotationMatrixZ.rotZ(rotateZ);
        rotationMatrixZ.mul(rotationMatrixY);
        rotationMatrixZ.mul(rotationMatrixX);
        transform.setRotation(rotationMatrixZ);

Good luck.
Geoff.

----- Original Message -----
From: Fiasco <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 18, 2001 1:33 PM
Subject: [JAVA3D] Rotating stuff


> I have an object in a viewer which I rotate by dragging either up/down (x
> axis rotation) or left/right (y axis rotation).
>
> How do I rotate the object relative to the world coordinates rather then
its
> local coordinates?  No matter what rotation the object may have I still
want
> the drag effect match up with the way the object is spun in the display.
>
> Newbie (thanks)
>
>
===========================================================================
> 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