This functions helps to build structures that use a single index per vertex for position, normal, color and texel instead of one index for each list.More...
Detailed Description
A set of utility functions to deal with model data components.
This functions helps to build structures that use a single index per vertex for position, normal, color and texel instead of one index for each list.
CS's 3d sprites are an example for this.
The 'poly' parameter is expected to be a valid polygon. The Sprite... lists should contain the (so far known) mapping of new indices to old indices. In other words, these lists are adressed with the 'single index' from the 3d sprite and return the 'multiple indices' used in the model data components. In the process of converting several polygons with this function, you should pass the same lists again and again. The lists will (probably) be empty for the first polygon and be filled a bit more for each polygon. Finally, after converting all polygons, the lists can be used to convert the vertex frames. Finally, the 'PolyVertices' parameter should be an empty list that will be filled with the 'single indices'.
You can omit those lists you do not need. For example, if you don't care about vertex colors, pass NULL for 'SpriteColors'. This has the effect that (obviously) you don't get a list of mapped vertex colors. It also tells this function that vertices with different colors may be merged.
Both objects may contain something. Note that overlapping vertices are NOT merged by this function. There are two reasons: Firstly, vertex merging is also useful without object merging and should therefore be done separately. Secondly, vertex merging is a very complex task (as the vertices to merge have to share position in every frame of every action) and is thus done separately anyway. @@ vertex merging is not yet implemented.