[EMAIL PROTECTED] wrote:
So, if anyone out there has experience of mapping from WTK to OSG, specifically 
in regards to what should happen to rotation angles, and quarternians, I would 
be most grateful - and perhaps my wall could then be repainted beige instead of 
red ;-(

I don't know about OSG to WTK specifically, but I might have a suggestion.

When translating an orientation (or more specifically, a rotation) from one coordinate system to another, the correct procedure is to first convert from your target coordinate system to your original coordinate system, then apply the rotation, then convert back. So

             -1
R' = M * R * M


Where R' is the desired rotation in OSG coordinates, R is the rotation in WTK coordinates, and M is the conversion matrix (or quat) from WTK coordinates to OSG coordinates.

Now, usually when I explain this, I get the ordering wrong, so if it doesn't work first try, just try reversing the order :-)

Hope this helps!

--"J"

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to