Hi Folks,
What's the quickest way to add a lot (like 250,000 or so) surfaces to an AC3D object in an importer plugin.
Currently I use something like;
Code:
List *surfaces = NULL;
...
Surface* s = new_surface();
// Set up surface
list_add_item_head(&surfaces,s);
...
object_add_surfaces(object,surfaces);
But it seems that list_add_item[_head] is relatively slow and gets slower the more surfaces I add.
Is there something like ac_object_add_vertices_from_float_array, but for surfaces that would let me pre-allocate a bunch of surfaces and add them to my object all in one hit?
Cheers.