sun.j3d.utils.behaviors.mouse.MouseTranslate implements such a
behavior, but the object is just translated into the direction of the
mouse movement, with a constant factor. The higher the factor, the
higher the translation.
I could somehow calculate the factor so that the translation
synchronizes with the mouse cursor. I think this may only work with
parallel projection, but that would be fine for me. But I have no idea
how to determine the correct factor.
Another way would be an own implementation, but that goes a little far
beyond my knowledge.
I had to create a ray from the mouse cursor on the projection plane,
and calculate a transform so that the picked point of the current node
lies on that ray.
Sounds complicated for me... Can anyone give some hints?
Kind regards, Sebastian
> Sounds complicated for me... Can anyone give some hints?
To me too. But I'm searching for the very same thing. So if you've found
something, let us know.
regards
Alex
--
Some operating systems are called `user friendly',
Linux however is `expert friendly'.
Encrypted Mails welcome. Send spam to toZo...@gmx.net, please.
PGP-Key at http://www.grans.eu/misc/pgpkey.asc | Key-ID: 0x6D7DD291
This is the "correct" solution, and the whole reason the factor exists.
Obviously, if you scale the image or change view parameters, you need a
different factor.
Btw, you can calculate the factor for orthographic projection, but you'd
need to do some trig -- it's similar to when the view params change or
the image scales, but you have to update it "live."
--
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups.