[osg-users] Retrieve the triangles indices array from a geometry.

Alberto Luaces aluaces at udc.es
Mon May 13 09:07:09 PDT 2019


"Dario Minieri" writes:

> Hello,
>
> I need to retrieve the triangles indices from a geometry. 
>
> I'm able to get all the verticies via getVertexArray() and then build an array that contains the getVertexArray() datas as list of scalars: [v1.x v1.y v1.z v2.x v2.y v2.z ... ]

Hi, Dario.  The geometry holds one or more primitivesets, and each one
holds a pointer to the index list that you are looking for.

You can save your model into an .osg or .osgt file in order to inspect
the layout of the data and to better understand what is happening.

-- 
Alberto



More information about the osg-users mailing list