I was actually mistaken on this. It looks like there is support for DrawArrayLengths. I jumped to this conclusion because of the seeming missing method for drawArrayLengths in TriangleFunctor, but discovered that drawArrayLengths are handles in the DrawArrayLengths::accept method, but converting it to multiple DrawArrays (makes sense, it was all I was going to do inside TriangleFunctor).
But my problem is still not solved. The issue really has to do with being able to get the intersected triangle in the IntersectVisitor, when vertex arrays are indexed (the real issue).
I think I understand why this is occuring: when arrays are indexed, a temporary cache of coordinates is set up in the TriangleFunctor and then it is treated as a simple unindexed DrawArray.
The problem then, is that when I get a hit in IntersectVisitor, I do not have the nice shortcut of having the three coordinates of the triangle intersected passed back in the hit record. I do have the primitive index, which I can use to find the coordinates again, but what I really need is indices, because what I'm after is the texture coordinates of the intersected triangle.
Is there a short-cut that's better than brute force searches of all vertices?
-don
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
