Add non-tree element lists to python bindings.
Fixes #1752. PiperOrigin-RevId: 649405039 Change-Id: Ie0b575a3ec912b773141694397ac2f394bff1227
This commit is contained in:
committed by
Copybara-Service
parent
d831153401
commit
a0945e4b5a
@@ -1551,6 +1551,12 @@ MJAPI mjsElement* mjs_firstChild(mjsBody* body, mjtObj type);
|
||||
// Return body's next child of the same type; return NULL if child is last.
|
||||
MJAPI mjsElement* mjs_nextChild(mjsBody* body, mjsElement* child);
|
||||
|
||||
// Return spec's first element of selected type.
|
||||
MJAPI mjsElement* mjs_firstElement(mjSpec* s, mjtObj type);
|
||||
|
||||
// Return spec's next element; return NULL if element is last.
|
||||
MJAPI mjsElement* mjs_nextElement(mjSpec* s, mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsBody, or return NULL if the element is not an mjsBody.
|
||||
MJAPI mjsBody* mjs_asBody(mjsElement* element);
|
||||
|
||||
@@ -1572,6 +1578,54 @@ MJAPI mjsLight* mjs_asLight(mjsElement* element);
|
||||
// Safely cast an element as mjsFrame, or return NULL if the element is not an mjsFrame.
|
||||
MJAPI mjsFrame* mjs_asFrame(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsActuator, or return NULL if the element is not an mjsActuator.
|
||||
MJAPI mjsActuator* mjs_asActuator(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsSensor, or return NULL if the element is not an mjsSensor.
|
||||
MJAPI mjsSensor* mjs_asSensor(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsFlex, or return NULL if the element is not an mjsFlex.
|
||||
MJAPI mjsFlex* mjs_asFlex(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsPair, or return NULL if the element is not an mjsPair.
|
||||
MJAPI mjsPair* mjs_asPair(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsEquality, or return NULL if the element is not an mjsEquality.
|
||||
MJAPI mjsEquality* mjs_asEquality(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsExclude, or return NULL if the element is not an mjsExclude.
|
||||
MJAPI mjsExclude* mjs_asExclude(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsTendon, or return NULL if the element is not an mjsTendon.
|
||||
MJAPI mjsTendon* mjs_asTendon(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsNumeric, or return NULL if the element is not an mjsNumeric.
|
||||
MJAPI mjsNumeric* mjs_asNumeric(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsText, or return NULL if the element is not an mjsText.
|
||||
MJAPI mjsText* mjs_asText(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsTuple, or return NULL if the element is not an mjsTuple.
|
||||
MJAPI mjsTuple* mjs_asTuple(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsKey, or return NULL if the element is not an mjsKey.
|
||||
MJAPI mjsKey* mjs_asKey(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsMesh, or return NULL if the element is not an mjsMesh.
|
||||
MJAPI mjsMesh* mjs_asMesh(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsHField, or return NULL if the element is not an mjsHField.
|
||||
MJAPI mjsHField* mjs_asHField(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsSkin, or return NULL if the element is not an mjsSkin.
|
||||
MJAPI mjsSkin* mjs_asSkin(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsTexture, or return NULL if the element is not an mjsTexture.
|
||||
MJAPI mjsTexture* mjs_asTexture(mjsElement* element);
|
||||
|
||||
// Safely cast an element as mjsMaterial, or return NULL if the element is not an mjsMaterial.
|
||||
MJAPI mjsMaterial* mjs_asMaterial(mjsElement* element);
|
||||
|
||||
|
||||
//---------------------------------- Attribute setters ---------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user