Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 18th March 2004, 10:56 PM   #1
monster
Member
Advanced member
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
Default Adding lots of surfaces quickly - Importer plugin

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.
monster is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 01:34 AM.


AC3D Forum
(C) Inivis Limited 2020