It's been done, but slightly different. All the behaviors have been
modified, not just rotate.
http://www.sigda.org/eric/java3d/behaviors/index.htm
At 03:27 PM 12/14/2000 -0500, you wrote:
>PickRotateBehavior rotates in the local coordinates of its
>Transform3D, without taking into account the rotations of
>any transforms that are higher in the scene graph tree.
>The result is that the x,y mouse movement may not correspond
>well with the actual motion of the object.
>
>I made modifications to MouseRotate.java and PickRotateBehavior.java
>to change this. My method was to use getLocalToVworld to get the
>transform3d of the 'parent' transformgroups. I then applied it
>and its inverse before and after applying the mouse-motion
>related transforms. See the 'doProcess' method in the source code to
>clarify.
>
>The code and a demo app are available here:
>http://www.csee.umbc.edu/~tnelso2/java3d/util
>
>The demo shows two cylinders that have been rotated 90 degrees
>in Z by a parent transform3d. The left one uses my
>'VworldPickRotateBehavior' and
>the right one uses Sun's PickRotateBehavior.
>
>
>to run it: java -jar vworldrotate.zip
>
>Maybe this has been done before (but I couldn't find it)
>I thought I would put it in the archives for others.
>If anyone has a better way to do this,
>please let me know.
>
>Tom Nelson
>
>===========================================================================
>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".
***********************************************************************
Eric Reiss - http://www.sigda.acm.org/Eric/
Email: [EMAIL PROTECTED]
SIGDA Internet Server Manager - http://www.sigda.acm.org/
Assistant Systems Manager - School of Engineering
University of Pittsburgh
***********************************************************************
===========================================================================
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".