Hi,

> 
> You original asked for vertices... now you want triangles... is that
> because you now know how to get the vertices, or is it that you now
> know what you want more precisely??


I knew how to get the vertex array, but the problem is that I don't know how to 
get the vertices for each sub-polygon (triangles) generated by the tessellation.


> Is that you are asking how to get the primitive data from a
> PrimitiveSet


Basically yes. My problem is that I don't really get how the tesselation works 
and how to create new polygons using the geometry modified by the tessellation. 
I thought that the tesselation would simply add new PrimitiveSet such as 
DrawArrays and that I could have created my new polygons using the getFirst() 
and getCount() function of DrawArrays with my vertexArray. Unfortunately, when 
I look at my geometry after the tesselation, it only has DrawElementsUByte, and 
I don't see how I could get a list of triangles from this PrimitiveSet. I've 
looked at the DOC, the headers and the source but I don't see what to do.


> Might I also ask you for what purpose you want to know the
> vertices/primitive data? What are you trying to do with it?


For my project, I had to create a class that handles Surfaces (it displays 
anykind of polygon and it has some useful tools). And I have to implement a 
tool that "triangulate" the polygon and create new Surfaces with each triangle 
; so instead of trying to implement my own tessellation algo, I thought I would 
simply use the osg tessellation.

I'm really sorry for my lack of precision in my previous posts. And thank you a 
lot for taking the time to help me.

Cheers,
Bob

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to