From 7efd690471bbc8fbdac10650b96b326d7f8d65dc Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Wed, 14 Aug 2024 02:23:23 -0700 Subject: [PATCH] Document where mesh transforms are saved, fixes #1894 PiperOrigin-RevId: 662836678 Change-Id: I060e3b1f29e82c6c3c188e730657cda7b99f63e9 --- doc/XMLreference.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index b6f240ec..338f7b7c 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -1106,7 +1106,8 @@ to convert to one of the other supported formats. .. _legacy-msh-docs: -MSH file format +.. collapse:: Legacy MSH file format + The binary MSH file starts with 4 integers specifying the number of vertex positions (nvertex), vertex normals (nnormal), vertex texture coordinates (ntexcoord), and vertex indices making up the faces (nface), followed by the numeric data. nvertex must be at least 4. nnormal and ntexcoord can be zero (in which case the corresponding data is @@ -1190,7 +1191,8 @@ The full list of processing steps applied by the compiler to each mesh is as fol normals. If sharp edges are encountered, the renderer uses the face normals to preserve the visual information about the edge, unless :ref:`smoothnormal` is true. Note that normals cannot be provided with STL meshes; -#. Scale, translate and rotate the vertices and normals, re-normalize the normals in case of scaling; +#. Scale, translate and rotate the vertices and normals, re-normalize the normals in case of scaling. Save these + transformations in ``mjModel.mesh_{pos, quat, scale}``. #. Construct the convex hull if specified; #. Find the centroid of all triangle faces, and construct the union-of-pyramids representation. Triangles whose area is too small (below the :ref:`mjMINVAL ` value of 1E-14) result in compile error;