Add mjs_getParent to retrieve the parent body of an object.

PiperOrigin-RevId: 715794859
Change-Id: Ib9792787cdb966f579938dde3f94ebabca8ef1fc
This commit is contained in:
Alessio Quaglino
2025-01-15 07:41:45 -08:00
committed by Copybara-Service
parent 10c7207cea
commit 05d4c3d670
10 changed files with 116 additions and 0 deletions
+3
View File
@@ -1546,6 +1546,9 @@ MJAPI mjsElement* mjs_findElement(mjSpec* s, mjtObj type, const char* name);
// Find child body by name.
MJAPI mjsBody* mjs_findChild(mjsBody* body, const char* name);
// Get parent body.
MJAPI mjsBody* mjs_getParent(mjsElement* element);
// Find frame by name.
MJAPI mjsFrame* mjs_findFrame(mjSpec* s, const char* name);