[ignition][Fortress] Problem in finding meshes and mesh names of primitive geometry [closed]
I am currently writing a system plugin for integrating an efficient lidar simulator. I am getting meshes using sdf_mesh->URI and searching for that mesh name using the MeshManager class.
The problem is that primitive geometry (such as box, sphere, etc.) doesn't have a way to access the URI, since they don't have one, so I am left wondering how can I find out, what their mesh names are, so I can get the meshes using the MeshManager.
bool GetMesh(const ignition::gazebo::components::Geometry* geometry,
int& v_count, int& i_count, rgl_vec3f*& vertices, rgl_vec3i** indices) {
auto mesh_sdf = geometry->Data().MeshShape();
if (mesh_sdf == nullptr) return false;
auto mesh_common = mesh_manager->MeshByName(mesh_sdf->Uri());
if (mesh_common == nullptr) return false; }