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
@@ -4176,6 +4176,24 @@ mjs_nextChild
|
||||
|
||||
Return body's next child of the same type; return NULL if child is last.
|
||||
|
||||
.. _mjs_firstElement:
|
||||
|
||||
mjs_firstElement
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_firstElement
|
||||
|
||||
Return spec's first element of selected type.
|
||||
|
||||
.. _mjs_nextElement:
|
||||
|
||||
mjs_nextElement
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_nextElement
|
||||
|
||||
Return spec's next element; return NULL if element is last.
|
||||
|
||||
.. _mjs_asBody:
|
||||
|
||||
mjs_asBody
|
||||
@@ -4239,6 +4257,150 @@ mjs_asFrame
|
||||
|
||||
Safely cast an element as mjsFrame, or return NULL if the element is not an mjsFrame.
|
||||
|
||||
.. _mjs_asActuator:
|
||||
|
||||
mjs_asActuator
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asActuator
|
||||
|
||||
Safely cast an element as mjsActuator, or return NULL if the element is not an mjsActuator.
|
||||
|
||||
.. _mjs_asSensor:
|
||||
|
||||
mjs_asSensor
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asSensor
|
||||
|
||||
Safely cast an element as mjsSensor, or return NULL if the element is not an mjsSensor.
|
||||
|
||||
.. _mjs_asFlex:
|
||||
|
||||
mjs_asFlex
|
||||
~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asFlex
|
||||
|
||||
Safely cast an element as mjsFlex, or return NULL if the element is not an mjsFlex.
|
||||
|
||||
.. _mjs_asPair:
|
||||
|
||||
mjs_asPair
|
||||
~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asPair
|
||||
|
||||
Safely cast an element as mjsPair, or return NULL if the element is not an mjsPair.
|
||||
|
||||
.. _mjs_asEquality:
|
||||
|
||||
mjs_asEquality
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asEquality
|
||||
|
||||
Safely cast an element as mjsEquality, or return NULL if the element is not an mjsEquality.
|
||||
|
||||
.. _mjs_asExclude:
|
||||
|
||||
mjs_asExclude
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asExclude
|
||||
|
||||
Safely cast an element as mjsExclude, or return NULL if the element is not an mjsExclude.
|
||||
|
||||
.. _mjs_asTendon:
|
||||
|
||||
mjs_asTendon
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asTendon
|
||||
|
||||
Safely cast an element as mjsTendon, or return NULL if the element is not an mjsTendon.
|
||||
|
||||
.. _mjs_asNumeric:
|
||||
|
||||
mjs_asNumeric
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asNumeric
|
||||
|
||||
Safely cast an element as mjsNumeric, or return NULL if the element is not an mjsNumeric.
|
||||
|
||||
.. _mjs_asText:
|
||||
|
||||
mjs_asText
|
||||
~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asText
|
||||
|
||||
Safely cast an element as mjsText, or return NULL if the element is not an mjsText.
|
||||
|
||||
.. _mjs_asTuple:
|
||||
|
||||
mjs_asTuple
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asTuple
|
||||
|
||||
Safely cast an element as mjsTuple, or return NULL if the element is not an mjsTuple.
|
||||
|
||||
.. _mjs_asKey:
|
||||
|
||||
mjs_asKey
|
||||
~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asKey
|
||||
|
||||
Safely cast an element as mjsKey, or return NULL if the element is not an mjsKey.
|
||||
|
||||
.. _mjs_asMesh:
|
||||
|
||||
mjs_asMesh
|
||||
~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asMesh
|
||||
|
||||
Safely cast an element as mjsMesh, or return NULL if the element is not an mjsMesh.
|
||||
|
||||
.. _mjs_asHField:
|
||||
|
||||
mjs_asHField
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asHField
|
||||
|
||||
Safely cast an element as mjsHField, or return NULL if the element is not an mjsHField.
|
||||
|
||||
.. _mjs_asSkin:
|
||||
|
||||
mjs_asSkin
|
||||
~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asSkin
|
||||
|
||||
Safely cast an element as mjsSkin, or return NULL if the element is not an mjsSkin.
|
||||
|
||||
.. _mjs_asTexture:
|
||||
|
||||
mjs_asTexture
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asTexture
|
||||
|
||||
Safely cast an element as mjsTexture, or return NULL if the element is not an mjsTexture.
|
||||
|
||||
.. _mjs_asMaterial:
|
||||
|
||||
mjs_asMaterial
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjs_asMaterial
|
||||
|
||||
Safely cast an element as mjsMaterial, or return NULL if the element is not an mjsMaterial.
|
||||
|
||||
.. _AttributeSetters:
|
||||
|
||||
Attribute setters
|
||||
|
||||
@@ -3551,6 +3551,8 @@ mjsDefault* mjs_getSpecDefault(mjSpec* s);
|
||||
int mjs_getId(mjsElement* element);
|
||||
mjsElement* mjs_firstChild(mjsBody* body, mjtObj type);
|
||||
mjsElement* mjs_nextChild(mjsBody* body, mjsElement* child);
|
||||
mjsElement* mjs_firstElement(mjSpec* s, mjtObj type);
|
||||
mjsElement* mjs_nextElement(mjSpec* s, mjsElement* element);
|
||||
mjsBody* mjs_asBody(mjsElement* element);
|
||||
mjsGeom* mjs_asGeom(mjsElement* element);
|
||||
mjsJoint* mjs_asJoint(mjsElement* element);
|
||||
@@ -3558,6 +3560,22 @@ mjsSite* mjs_asSite(mjsElement* element);
|
||||
mjsCamera* mjs_asCamera(mjsElement* element);
|
||||
mjsLight* mjs_asLight(mjsElement* element);
|
||||
mjsFrame* mjs_asFrame(mjsElement* element);
|
||||
mjsActuator* mjs_asActuator(mjsElement* element);
|
||||
mjsSensor* mjs_asSensor(mjsElement* element);
|
||||
mjsFlex* mjs_asFlex(mjsElement* element);
|
||||
mjsPair* mjs_asPair(mjsElement* element);
|
||||
mjsEquality* mjs_asEquality(mjsElement* element);
|
||||
mjsExclude* mjs_asExclude(mjsElement* element);
|
||||
mjsTendon* mjs_asTendon(mjsElement* element);
|
||||
mjsNumeric* mjs_asNumeric(mjsElement* element);
|
||||
mjsText* mjs_asText(mjsElement* element);
|
||||
mjsTuple* mjs_asTuple(mjsElement* element);
|
||||
mjsKey* mjs_asKey(mjsElement* element);
|
||||
mjsMesh* mjs_asMesh(mjsElement* element);
|
||||
mjsHField* mjs_asHField(mjsElement* element);
|
||||
mjsSkin* mjs_asSkin(mjsElement* element);
|
||||
mjsTexture* mjs_asTexture(mjsElement* element);
|
||||
mjsMaterial* mjs_asMaterial(mjsElement* element);
|
||||
void mjs_setString(mjString* dest, const char* text);
|
||||
void mjs_setStringVec(mjStringVec* dest, const char* text);
|
||||
mjtByte mjs_setInStringVec(mjStringVec* dest, int i, const char* text);
|
||||
|
||||
Reference in New Issue
Block a user