Hi Sam,
as I don't use the com.sun classes of Java3D I only can give you some
general hints. You want to let move around picked objects in the xy-plane of
the vworld coord system, will say, allways in the screen plane You have to
transform the object from its local coord system into the vworld coord
system. Next, apply the transformation there and transform it back into its
own coord system. That's only true, if you don't move your viewpoint. If
you're moving your viewpoint too, you have to transform the objects into the
coord system of your viewpoint and so on....
I guess exactly that you want to avoid ...?
Gernot Veith
[EMAIL PROTECTED]
http://www.janet.de <http://www.janet.de/>
-----Original Message-----
From: Sam Hasinoff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 13, 1999 7:50 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] PickMouseBehaviors in the World Frame?
Hi everyone...
I have my program setup so that when shift is pressed, the whole set of
MouseBehaviors are active and the viewpoint (or whole scene) moves around.
Without shift pressed, the set of PickMouseBehaviors are active instead and
the selected object gets moved around.
Fine, except that the pick transformations to an object occur in that
object's frame of reference. Meaning that if the viewpoint is around the
"back," for example, then translating with the mouse to the right will cause
the object to move to ITS right (screen left), and not in the intuitive way
across the screen.
What I would like is for the pick behaviors to be able to affect selected
objects in the world frame of reference. What would be a good way of
achieving this? I cannot seem to figure out the documentation for pick
behaviors. For example, what is the Transform3D that gets passed to the
transformChanged callback? I can imagine doing a bunch of matrix inversions
and multiplies but the specifics are eluding me, and there may be an easier
way of doing this...
Thanks for your help,
Sam Hasinoff
===========================================================================
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".