Merge pull request #2390 from talregev:TalR/mesh

PiperOrigin-RevId: 723916727
Change-Id: I0abb0a12121c9eb291ccbc6afa0b4117bd389956
This commit is contained in:
Copybara-Service
2025-02-06 06:46:40 -08:00
2 changed files with 6 additions and 3 deletions
+5 -1
View File
@@ -31,6 +31,10 @@
#include <mujoco/mjspec.h>
#include "user/user_cache.h"
#include "user/user_util.h"
#include <tiny_obj_loader.h>
using face_vertices_type =
decltype(tinyobj::mesh_t::num_face_vertices)::value_type;
// forward declarations of all mjC/X classes
class mjCError;
@@ -1010,7 +1014,7 @@ class mjCMesh: public mjCMesh_, private mjsMesh {
std::vector<int> vertex_index_;
std::vector<int> normal_index_;
std::vector<int> texcoord_index_;
std::vector<unsigned char> num_face_vertices_;
std::vector<face_vertices_type> num_face_vertices_;
// compute the volume and center-of-mass of the mesh given the face center
void ComputeVolume(double CoM[3], mjtGeomInertia gtype, const double facecen[3]);