Hi,
I am searching for a solution that allows dragging/moving/translate
objects *directly* with the mouse. Direct means, the objects moves
exactly with the cursor.
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
Alexander Gran - 04 Jan 2008 22:43 GMT
Sebastian Paul schrieb:
> 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

Signature
Some operating systems are called `user friendly',
Linux however is `expert friendly'.
Encrypted Mails welcome. Send spam to toZodiac@gmx.net, please.
PGP-Key at http://www.grans.eu/misc/pgpkey.asc | Key-ID: 0x6D7DD291
Miss Elaine Eos - 10 Jan 2008 06:13 GMT
In article
<7bc88e7f-fc92-4218-873f-0874643fced5@18g2000hsf.googlegroups.com>,
> I could somehow calculate the factor so that the translation
> synchronizes with the mouse cursor.
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."

Signature
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.
Sebastian Paul - 05 Feb 2008 15:11 GMT
This approach sounds promising:
http://forums.java.net/jive/thread.jspa?messageID=239358𺝖