toMeshData
Convert list of polygons to MeshData
Converts the vertex data into a MeshData representation by constructing the indexed polygons based on the vertex data attributes such as positions, texture coordinates, colors, normals, tangents, and bitangents.
Each triangle in the vertex data is represented as an IndexedPolygon, where the indices are generated based on the triangle order, and optional attributes like texture coordinates or colors are included if present in the source vertex data.
Return
A MeshData instance containing the vertex data and a list of indexed polygons representing the mesh.