I'm constructing my own picking utils. I want to find a intersection of
eye->mousepos ray with given plane. Everything is ok, except there is a
small error in resulting coordinates.
With a bit a testing I've come to conclusion that
Canvas3D.getPixelLocationInImagePlate gives slightly wrong (or at least
strange) results. For me it was obvious that eye is present in the
middle of view plate, moved a bit to back. From what I see, eye is in
lower left corner. Thus my picking util (which moves sphere to the place
pointed by the mouse, on given plane) is correct in left bottom corner,
but sphere is moved too much if I move cursor to upper right corner.
But what is REALLY strange for me, is that what is important, is lower
left corner of _screen_, not window. Thus if I move window to lower left
corner of screen, pointer will be ok there. If I will place it
otherwhere, results have greater error.
I could possibly understand this if window would be a 'real window' to
virtual universe - with moving it across of screen I could see different
places. But projection is constant - why then results are window
position dependent ???
Anyway, my question goes:
- How can I get a vector from center of view to mouse position in image
plate ? Should I get mouse position in middle of window, move it back by
same amount as eye is and only then perform all equations ?
- How can I make everything independent from window position on screen ?
Artur
===========================================================================
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".