Hello Georg,
Wünsch wrote:
> Hi Simon,
>
> thank you for your help, the one that is able to read has got a clear
> advantage...
>
> But what happens to line and point vertex data that might be distributed
> throughout the triangle vertex data? As I understand, I can iterate through
> the triangles and copy the indices. They then refer to the original vertex
> array. This will be ok, if I dont have lines and points, as I just make a
> copy of all the vertices and thats it. But what happens with the vertices of
> points and lines, if there are some, they need to be dropped out with all the
> other references needing to be adapted, isn't it? Does anyone know a good
> algorithm?
in that case the TriangleIterator is maybe not the best to use, as it
assumes the geometry to consist of faces only. It will warn when it
encounters a line or point and skip them.
The type of filtering you want to do can become quite complex as you
have to be careful when removing a vertex that it is not used for both a
line and a triangle for example. On the other hand, if there are only a
few lines/points in your geo and you don't care too much about a few
extra vertices, you could just leave them in and only edit the indices
and types properties.
Can you give us a description of what you are trying to achieve and
whether you can make some assumptions on your input geometry?
Thanks,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users