Add tree traversal utilities to C API.
PiperOrigin-RevId: 639285787 Change-Id: Ieb52da87fb5e1c674985f03c9ff2b18783d1d657
This commit is contained in:
committed by
Copybara-Service
parent
936866be0f
commit
14a3ce5ffa
@@ -916,6 +916,15 @@ MJAPI mjsDefault* mjs_getSpecDefault(mjSpec* s);
|
||||
MJAPI int mjs_getId(mjElement* element);
|
||||
|
||||
|
||||
//---------------------------------- Tree traversal ------------------------------------------------
|
||||
|
||||
// Return body's first child of given type.
|
||||
MJAPI mjElement* mjs_firstChild(mjsBody* body, mjtObj type);
|
||||
|
||||
// Return body's next child of the same type; return NULL if child is last.
|
||||
MJAPI mjElement* mjs_nextChild(mjsBody* body, mjElement* child);
|
||||
|
||||
|
||||
//---------------------------------- Attribute setters ---------------------------------------------
|
||||
|
||||
// Copy text to string.
|
||||
|
||||
Reference in New Issue
Block a user