Hi Luke,
[...] osg::GUIEventAdapter::getXnormalized(), but I cannot for the life of me
find the code for that function.
It's directly in the header (include/osgGA/GUIEventAdapter):
inline float getXnormalized() const { return
2.0f*(getX()-getXmin())/(getXmax()-getXmin())-1.0f; }
If anyone knows of a method to convert world coordinates back to screen
coordinates without having to totally reimplement my picking system, that would
be great. If anyone can point me to the code for getXnormalized or the method
used (I've found some - but they don't lead to the exact same result), that
would be great as well.
Search the archives, I answered the opposite of this question not long
ago (how to convert a screen position to a world space position), which
should be easy to reverse to find out what you want to.
I'll even make it real easy for you:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/59941/focus=59966
But you'll have to do the work of taking those calculations and
reversing them to get from world space to screen space.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org