Simon Haegler wrote:
> osgHello
>
> i'm doing some vertex manipulation and ran into the (basic) problem, that a 
> box
> created by makeBoxGeo consists of 24 vertices.
>
> how do i avoid to move the vertices for every face separately? is there some
> kind of "merge vertices" functionality as in maya? is there a "opensg way" to
> manipulate primitives?
>   
Not really. You would have to create multi-indexed geometries for that 
to work, but they are slow since they are not directly supported by 
OpenGL (so OpenSG has to call glBegin(), glVertex().... glEnd() to 
render them, instead of using vertex arrays or vbo's).

The easiest way would probably be to create a multi-map from positions 
to vertex-indexes, and for each frame update the unique vertices first 
and copy their values out to every matching OpenSG-vertex second. It's 
what we do for our physics simulations. (It's a similar problem, as we 
need multiple vertices to make tangent space bumpmapping behave well, 
but only want to simulate one particle per "point".)

Cheers,
/Marcus

-------------------------------------------------------------------------
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

Reply via email to