Hi Martin,

I would recommend using the osgUtil::IntersectionVisitor rather than
the osgUtil::IntersectVisitor as the later is deprecated and only kept
around for backwards compatibility.

As for examples of getting the texture coords of a ray intersections
have a look at the osgViewer::InteractiveImageHandler implementation
in src/osgViewer/ViewerEventHandlers.cpp as it does just this.

Robert.

2009/6/19 Großer Martin <[email protected]>:
> Hello all,
>
> i use the intersectVisitor to get the intersection between a ray and a
> geode. It works fine and I'm very happy, because it is very comfortable.
> Now I have the point (vector) of intersection, but I need the triangle
> of the drawable what I hit. I would like calculate the barycentric
> coordinates of the point. With this coordinates I want to calculate the
> texture coordinates of my intersection point.
>
> There are a comfortable way in osg? Or have anyone a idea for a nice
> solution? I think the intersectVisitor find the triangle, but i can't
> get this information.
>
>
> Cheers
>
> Martin
>
> _______________________________________________
> 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