toPolygons
Converts the compound mesh data into a map of polygons grouped by their compound names.
This function traverses the compounds
map within the ICompoundMeshData
instance, converting each IMeshData
to a list of IPolygon
objects. The resulting map preserves the structure of the original compounds
map, associating each compound name with its corresponding list of polygons.
Return
a map where each key is the name of a compound, and the value is a list of IPolygon representing the polygons of the corresponding compound data.
Converts the vertex buffer into a list of polygons based on the provided vertex count. Each polygon is formed by grouping vertices into triangles.
Return
A list of polygons, where each polygon contains the vertex positions, texture coordinates, colors, and normals.
Parameters
The number of vertices to process from the vertex buffer. Defaults to the total number of vertices in the buffer.