simGetObjectsInTree

Retrieves object handles in a given hierarchy tree

C++ synopsis

int* simGetObjectsInTree(int treeBaseHandle, int objectType, int options, int* objectCount)

Arguments

  • treeBaseHandle: handle of the object that describes the hierarchy tree, or sim.handle_scene for all objects in the scene.
  • objectType: 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

Return

  • 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.


See also: