[osg-users] Specifying indices of triangle vertices when creating osg::geometry

antiro black antiro42 at gmail.com
Thu Dec 21 04:45:02 PST 2017


Hi,

I want to create a specific mesh using osg. I have a set of vertices and a set of indices for the triangles which the mesh should consist of.

I tried using osg::geometry to create this mesh but I can't figure out how to specify the triangle vertex indices. Do I need an osg::IndexArray for this? How do I set it? There is a setVertexArray() member function for osg::geometry but nothing to specify indices.

I also looked at the primitive sets to see if I could specify indices there but I couldn't figure it out.

I tried both google and going through the example code without any success. Any help would be much appreciated!

Thank you!

Cheers,
antiro

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72618#72618







More information about the osg-users mailing list