IMO you should group the objects into a smaller amount of include files
rather than having every single one in its own file (unless the files are
very large, which I think is not the case with such simple objects). While
parsing an include file with dozens of objects might take slightly longer,
it's not that bad (as long as you don't go overboard). Just group all the
polyhedra into logical categories, and create one include file for each
such category. Then maybe an include file which just includes all those
separate include files.
Also, if you haven't done so, I think all the polyhedra should be scaled
to fit the same space, for consistency. For example, they could be scaled
so that they all fit perfectly inside a box from <-1, -1, -1> to <1, 1, 1>.
This way it's easy for the user to scale any polyhedron to the size he needs.
Also, I don't know how you have thought about defining the objects, but
you could do two things:
1) #define each polyhedron as its own identifier, named logically and
2) For each category, create an array with all the polyhedra of that
category, ordered in some logical way.
This way the user can use either the name of the polyhedron directly,
or index that array, as needed.
Post a reply to this message