Allow mesh data to be reuploaded without having to recreate the mesh.

Splits mjrfMeshData into config+data parts.

PiperOrigin-RevId: 952042545
Change-Id: I19a572a0f591fa0d33bbc2c32b974efc075310f4
This commit is contained in:
Haroon Qureshi
2026-07-22 04:55:59 -07:00
committed by Copybara-Service
parent d3166cb630
commit ba9a65031b
19 changed files with 469 additions and 321 deletions
+11 -1
View File
@@ -1452,12 +1452,22 @@ culling. Alternatively, the bounds can be computed at runtime (though there is a
are provided (or calculated), then frustum culling will not be performed.
.. _mjrfMeshConfig:
mjrfMeshConfig
~~~~~~~~~~~~~~~~~
Parameters for creating a :ref:`mesh<mjrfMesh>`.
.. mujoco-include:: mjrfMeshConfig
.. _mjrfMeshData:
mjrfMeshData
~~~~~~~~~~~~
Binary data used for creating a :ref:`mesh<mjrfMesh>`.
Binary data for a :ref:`mesh<mjrfMesh>`.
.. mujoco-include:: mjrfMeshData
+24 -6
View File
@@ -3249,14 +3249,14 @@ Returns the height of the texture.
Returns the sampler type (mjrSamplerType) used by the texture.
[returns: mjrSamplerType]
.. _mjrf_defaultMeshData:
.. _mjrf_defaultMeshConfig:
`mjrf_defaultMeshData <#mjrf_defaultMeshData>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`mjrf_defaultMeshConfig <#mjrf_defaultMeshConfig>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. mujoco-include:: mjrf_defaultMeshData
.. mujoco-include:: mjrf_defaultMeshConfig
Initializes the mjrfMeshData to default values.
Initializes the mjrfMeshConfig to default values.
.. _mjrf_createMesh:
@@ -3265,7 +3265,7 @@ Initializes the mjrfMeshData to default values.
.. mujoco-include:: mjrf_createMesh
Creates a mesh with the given data.
Creates an empty mesh with the given config.
.. _mjrf_destroyMesh:
@@ -3276,6 +3276,24 @@ Creates a mesh with the given data.
Destroys the mesh.
.. _mjrf_defaultMeshData:
`mjrf_defaultMeshData <#mjrf_defaultMeshData>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. mujoco-include:: mjrf_defaultMeshData
Initializes the mjrfMeshData to default values.
.. _mjrf_setMeshData:
`mjrf_setMeshData <#mjrf_setMeshData>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. mujoco-include:: mjrf_setMeshData
Uploads the given mesh data to the mesh.
.. _mjrf_defaultSceneParams:
`mjrf_defaultSceneParams <#mjrf_defaultSceneParams>`__