Dave,

Yeah, this one is a bit funny.  Think of it this way.  The axis of
rotation starts out as the y-axis.  Your "axisOfRotation" will be a
transform that will move the positive y-axis to your desired rotation
axis.  For example:

// To rotate around positive x-axis, rotate the y-axis by -90 deg about
Z
Transform3D axisOfRotation = new Transform3D();
axisOfRotation.rotZ( Math.toRadians(-90) );
rotinterp  = new RotationInterpolator(myalpha, mytarget, axisOfRotation,
                 minimumAngle, maximumAngle);

If instead you wanted to rotate about the positive z-axis, then:
axisOfRotation.rotX( Math.toRadians(90) );

Hope this helps.
-Lee

J. Lee Dixon
SAIC - Celebration, FL
407-566-1438
[EMAIL PROTECTED]    AOL: LeeOrlando


-----Original Message-----
From: Jarzabek, David [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 06, 2000 9:10 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Axis of rotation question


I'm working my way through the tutorial and I wanted to make
the YoYo example rotate around the X-Axis rather than the Y-Axis.
The constructor for the RotationInterpolator class has a rotation
axis parameter, but it is of class Transform3D, rather than something
a bit more obvious like a class member defining the axis of rotation.

I was successful in rotating the model so that the ends of the
yoyo were vertical rather than horizontal, but the axis of rotation
was still not what I was looking for.

I'm sure the answer is trivial, but I still haven't made the connection.

Thanks, Dave J

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