Hello Simon,
Simon Haegler wrote:
> osgHello
>
> i would like to subdivide all edges of a geometry object and triangulate the
> result. the source geometry contains all kinds of faces (tri, quads, polys).
>
> what is the most elegant (lazy) way? (compared to iterating over all the
> vertices and creating the faces manually)
you can use the PrimitiveIterator to get all the primitives of the
geometry. The downside of course is that you'll have a hard time
avoiding duplication of vertices on edges of the source geometry. I
suppose you'd need a half edge structure to get this right -- there is
HalfEdgeGraph in OpenSG, but AFAIK it is only targeted at the geometry
striper, so I'm not sure if it helps.
Cheers,
Carsten
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users