MeshModelClass This class is a repository for all of the geometry information that defines the mesh. Its purpose is to allow separate instances of a mesh to share as much data as possible.
There are some tricky aspects to this class that may not be immediately obvious. The arrays of pointers to textures and vertex materials must be handled in a special way due to the fact that they are also ref-counted objects which should only be released when the last reference to the array is released (i.e. when no one is using the array any more...)
Copy/Add_Ref Rules: The purpose of this model was to share data between models whenever possible. To this end, some of the arrays of data are handled differently:
ALWAYS SHARED: These are ALWAYS Add_Ref'd and thus all point to the same array Poly - Connectivity of a mesh are always shared (cannot be changed at runtime) VertexShadeIdx - Shade indices of a mesh are always shared (cannot be changed at runtime) VertexInfluences - Vertex bone attachments are always shared (cannot be changed at runtime)
SHARED UNTIL SCALED, SKIN DEFORMED, or DAMAGED:
Vertex - vertex positions must be copied if any are moved... VertexNorm - vertex normals cannot be shared if a vertex is moved PlaneEq - plane equations cannot be shared if a vertex is moved CullTree - culling tree becomes instance specific if a vertex moves (shouldn't even use this with skins...)
ALWAYS UNIQUE, BUT SHARE ARRAYS BETWEEN ALTERNATE MATERIAL REPRESENTATIONS (should we share some of these?) UV, DIG, DCG, SCG Texture, Shader, Material, TextureArray, MaterialArray, ShaderArray GapFillerClass This class is used to generate gap-filling polygons for "N-Patched" meshes
Definition at line 126 of file meshmdl.h.