csModelDataTools Struct Reference
A set of utility functions to deal with model data components. More...
#include <mdltool.h>
Static Public Methods | |
void | MergeCopyObject (iModelDataObject *dest, iModelDataObject *src) |
Copy the contents of one object into antoher one. | |
void | CopyVerticesMapped (iModelDataObject *dest, iModelDataObject *src, const csModelDataVertexMap *map) |
Copy the default vertices and actions of one object into another one. | |
void | MergeObjects (iModelData *Scene, bool MultiTexture) |
Merge all contained mesh objects in a scene into a single one. | |
void | SplitObjectsByMaterial (iModelData *Scene) |
Split objects in a scene using more than one material into objects with only a single material. | |
void | Describe (iObject *obj, csString &s) |
Print a description of an object into a string. | |
void | CompressVertices (iModelDataObject *Object) |
Merge duplicate vertices, normals, colors and texels in an object. | |
void | CompressVertices (iModelData *Scene) |
Merge duplicate vertices, normals, colors and texels in all objects of a model data scene. | |
void | BuildVertexArray (iModelDataPolygon *poly, csDirtyAccessArray< int > *SpriteVertices, csDirtyAccessArray< int > *SpriteNormals, csDirtyAccessArray< int > *SpriteColors, csDirtyAccessArray< int > *SpriteTexels, csDirtyAccessArray< int > *PolyVertices) |
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. |
Detailed Description
A set of utility functions to deal with model data components.
Definition at line 100 of file mdltool.h.
Member Function Documentation
|
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 0 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. |
|
Merge duplicate vertices, normals, colors and texels in all objects of a model data scene.
|
|
Merge duplicate vertices, normals, colors and texels in an object.
|
|
Copy the default vertices and actions of one object into another one. All vertex, normal, color and texel indices are mapped as described in the given mapping table. |
|
Print a description of an object into a string.
|
|
Copy the contents of one object into antoher one. 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. |
|
Merge all contained mesh objects in a scene into a single one. If 'MultiTexture' is true then objects with different textures may be merged. |
|
Split objects in a scene using more than one material into objects with only a single material.
|
The documentation for this struct was generated from the following file:
- cstool/mdltool.h
Generated for Crystal Space by doxygen 1.2.18