a flexible data structure for geometries
Posted
by
AkiRoss
on Game Development
See other posts from Game Development
or by AkiRoss
Published on 2013-11-04T21:16:11Z
Indexed on
2013/11/04
22:16 UTC
Read the original article
Hit count: 236
What data structure would you use to represent meshes that are to be altered (e.g. adding or removing new faces, vertices and edges), and that have to be "studied" in different ways (e.g. finding all the triangles intersecting a certain ray, or finding all the triangles "visible" from a given point in the space)? I need to consider multiple aspects of the mesh: their geometry, their topology and spatial information.
The meshes are rather big, say 500k triangles, so I am going to use the GPU when computations are heavy.
I tried using arrays with vertices and arrays with indices, but I do not love adding and removing vertices from them. Also, using arrays totally ignore spatial and topological information, which I may need studying the mesh. So, I thought about using custom double-linked list data structures, but I believe doing so will require me to copy the data to array buffers before going on the GPU. I also thought about using BST, but not sure it fits.
Any help is appreciated. If I have been too fuzzy and you require other information feel free to ask.
© Game Development or respective owner