[Gtkradiant] Update: TranslateFree (Dominant axis movement)
basiror at gmx.de
Wed Mar 21 02:53:52 CDT 2007
at the current revision the TranslateFree behaves like this:
1. create a patch somewhere on the x-axis
2. in the camera view look parallel to the x-axis
3. rotate the camera at the downwards
4. if you select a vertex of the patch now and move it upwards( mouse delta on the y-axis) a lot
you will experience that the vertex is translated into x-axis direction as well, against your expectations
The reason why is because the ray through your mouse cursor is projected onto the far plane and the deltas between mouse drag(x,y) and mouse drop(x,y) are computed and since you are looking downwards a little a little delta into x-axis direction is computed as well.
In my update I have calculated 2 reference directions, moving the cursor in window coordinates into (900,0) & (0,900) direction
I then calculate the drag&drop delta vectors and use these to determine the main axis of movement
so 2 axis are used and the 3rd axis component of the translation vector is cancled out.
The result is a translate along the 2 main axis
For more information see the selection.cpp.diff
Please at this to the svn
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1964 bytes
Desc: not available
Url : http://zerowing.idsoftware.com/pipermail/gtkradiant/attachments/20070321/ef8daa5d/selection.cpp.bin
More information about the Gtkradiant