Typically: "How do I... ", "How can I... " questions
- Posts: 22
- Joined: 20 Nov 2013, 18:30
I would like to retrieve the current scene's "scene graph" (https://en.wikipedia.org/wiki/Scene_graph
) using the remote API.
To clarify, a very simple example of what I mean is something like this:
Considering a scene with a single car and a pole in it.
I looked into the documentation but failed to find it. Is there a command for that?
Thanks in advance.
- Site Admin
- Posts: 7605
- Joined: 14 Dec 2012, 00:25
you don't have such a function directly available from the remote API. But you can call a script function that will handle this for you (with simxCallScriptFunction
). In that script function, simply iterate over all objects, for instance with:
Code: Select all
if objHandle~=sim.handle_scene then
local str=string.rep(' ',indent)..sim.getObjectName(objHandle)
for i=1,#directChildren,1 do