Regular API function

simGetObjectsInTree / sim.getObjectsInTree

Description Retrieves object handles in a given hierarchy tree. See also sim.getObjects.
C synopsis simInt* simGetObjectsInTree(simInt treeBaseHandle,simInt objectType,simInt options,simInt* objectCount)
C parameters
treeBaseHandle: the handle of the object that describes the hierarchy tree, or sim_handle_scene for all objects in the scene.
objectType: the object type to retrieve or sim_handle_all for any type of object in the tree
options: bit-coded:
bit0 set (1): exclude the tree base from the returned array
bit1 set (2): include in the returned array only the object's first children. If treeBaseHandle is sim_handle_scene, then only parentless objects will be included.
objectCount (out value): the number of returned object handles
C return value
a pointer to an array containing object handles, or nullptr in case of an error. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis table[] objects=sim.getObjectsInTree(int treeBaseHandle,int objectType=sim.handle_all, int options=0)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Remote API equiv.
B0-based remote API: simxGetObjectsInTree
Legacy remote API: -