Hi Robert,

To see how to compute the tex coords have a look at how it's done in
the osgViewer::InteractiveImageHandler, in particular the bool
InteractiveImageHandler::mousePosition(..) method implementation found
in src/osgViewer/ViewerEventHandlers.cpp.

Robert.

On Sun, Aug 8, 2010 at 11:45 PM, Robert Youngren
<[email protected]> wrote:
> Hi,
>
> Right, I understand that I can make a call to osg::Image::getColor(s,t), 
> however how do I convert from world coordinates (intersection on the object) 
> to texture coordinates?  Is there a method in osg to do this, or do I need to 
> come up with a coordinate transformation matrix?  Clearly this has had to 
> have been done.  I guess I can look at the osg source to see how an image is 
> texture mapped onto a 3d object and just do the reverse?
>
> Thank you!
>
> Cheers,
> Robert
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=30629#30629
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to