Converts a GeoMesh into an ignition::common::Mesh.
The ignition::common::Mesh will contain only one ignition::common::SubMesh, and current implementation only supports up to four vertices per GeoFace. Note that generated meshes will point to both sides, consequently for each group of three vertices that represent a triangle in the mesh, there are six indices entries.
- Parameters
-
name | The name of the mesh. |
geo_mesh | The GeoMesh to convert into a ignition::common::Mesh. It must have at least once GeoFace with at least three vertices on it. |
- Returns
- A std::unique_ptr<ignition::common::Mesh> with the equivalent mesh construction. The pointer will be nullptr when the mesh has not the correct vertices requirements.