<div dir="ltr"><div><div>Hi Mike,<br><br></div>In the osgUtil::LineSegmentItersector::Intersection object there is now (in OSG-3.2 onwards) the convenience method:<br><br> /** Convenience function for mapping the intersection point to any textures assigned to the objects intersected.<br> * Returns the Texture pointer and texture coords of object hit when a texture is available on the object, returns NULL otherwise.*/<br> osg::Texture* getTextureLookUp(osg::Vec3& tc) const;<br><br></div>From the Texture* you can then get the assigned osg::Image, and osg::Image has a convenience method:<br><div><div><br> /** Get the color value for specified texcoord.*/<br> Vec4 getColor(const Vec3& texcoord) const;<br><br></div><div>Which should give you exactly what you want. It's possible to everything these new methods do on old versions of the OSG than 3.2 but you'll need to replicate what these do internally. Have a look at the source online for these methods for inspiration.<br><br></div><div>Robert.<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 August 2015 at 20:58, Mike Greene <span dir="ltr"><<a href="mailto:mgreene@hiwaay.net" target="_blank">mgreene@hiwaay.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am wanting to do a dust cloud when an entity (helicopter) lands on a terrain. Ideally, would like the color of the dust cloud to be similar to the material/texture that the entity is on. Is there a way to do a "material/texture color" query based on an entity position, kind of like an LOS intersector test?<br>
Thank you!<br>
<br>
Cheers,<br>
Mike<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=64857#64857" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64857#64857</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br></div>