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".

Reply via email to