[osg-users] Same vertices selected multiple times

Julien Valentin julienvalentin51 at gmail.com
Mon Jan 15 08:20:30 PST 2018

Hi Antoine
You've totally get it :)
I would add that TemplatePrimitiveIndexFunctor is your friend for this use case


arennuit wrote:
> Hello and thanks for your answer,
> What you mean is that I should share the vertices when building the osg::Geometry, right?
> This is possible indeed, but then OSG would still select faces in the osgUtil::PolytopeIntersector, and I would still have to convert the faces into vertices, right? So if I understand well, what you are saying is that I should then convert the faces back into vertex iindices using a reference to the primivites set triangles_osg (and not via 3 * primitives[i] + 0/1/2 as currently done). And finally I understand that this would return redundant vertex indices (which are much easier to make unique than vertex coordinates).
> Did I get it?
> Kind regards,
> Antoine.

Read this topic online here:

More information about the osg-users mailing list