add mjs_detachDefault to delete a default class from mjSpec

PiperOrigin-RevId: 738452369
Change-Id: I5a53a6dc8f89e1e8136aeefc09d7d9b7b7204e1f
This commit is contained in:
Tom Power
2025-03-19 10:30:08 -07:00
committed by Copybara-Service
parent a1b9ffd124
commit be64747166
18 changed files with 261 additions and 24 deletions
+12 -2
View File
@@ -3851,7 +3851,16 @@ Attach child frame to a parent site, return the attached frame if success or NUL
.. mujoco-include:: mjs_detachBody
Detach body from mjSpec, remove all references and delete the body, return 0 on success.
Delete body and descendants from mjSpec, remove all references, return 0 on success.
.. _mjs_detachDefault:
`mjs_detachDefault <#mjs_detachDefault>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. mujoco-include:: mjs_detachDefault
Delete default class and descendants from mjSpec, remove all references, return 0 on success.
.. _AddTreeElements:
@@ -3936,7 +3945,8 @@ Add frame to body.
.. mujoco-include:: mjs_delete
Delete object corresponding to the given element, return 0 on success.
Delete object corresponding to the given element, return 0 on success. This function should only be used for element
types that cannot have children, i.e. excluding bodies and default classes.
.. _AddNonTreeElements:
+5
View File
@@ -704,3 +704,8 @@ to the inputs. Below, :math:`\bar q` denotes the pre-modified quaternion:
Note that derivatives depend only on :math:`h` and :math:`v` (in fact, on :math:`s = h v`).
All outputs are optional.
.. _mjs_delete:
Delete object corresponding to the given element, return 0 on success. This function should only be used for element
types that cannot have children, i.e. excluding bodies and default classes.