Re: [osg-users] RGB Color of Texture Map at Intersection

2010-08-09 Thread Robert Osfield
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,

Re: [osg-users] RGB Color of Texture Map at Intersection

2010-08-08 Thread Jason Daly
On 8/8/2010 6:45 PM, Robert Youngren 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 co

Re: [osg-users] RGB Color of Texture Map at Intersection

2010-08-08 Thread Robert Youngren
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

Re: [osg-users] RGB Color of Texture Map at Intersection

2010-08-08 Thread Robert Osfield
Hi Robert, You'll need to get the texture coordinates from the intersection point and then look up the colour from the any osg::Image attached the osg::Texture's that are attached to the osg::StateSet associated with the intersection geometry. Robert. On Thu, Aug 5, 2010 at 4:15 PM, Robert Young

[osg-users] RGB Color of Texture Map at Intersection

2010-08-05 Thread Robert Youngren
Hi, I've got a texture mapped geometry in a scene that I'm "shooting rays" at. I'm using the osgUtil::IntersectVisitor::Hit structure to get at the drawable that was intersected. What I really need is the color of the polygon at the intersected point. I have the hit point location in world co