Regular API function

simGetConfigurationTree

Description Retrieves configuration information for a hierarchy tree (object relative positions/orientations, joint/path values). Calling simSetConfigurationTree at a later time, will restore the object configuration (use this function to temporarily save object positions/orientations/joint/path values)
C synopsis simChar* simGetConfigurationTree(simInt objectHandle)
C parameters
objectHandle: handle of the object that is at the base of the tree (all objects built on top of this one (including this one)) will have their configuration retrieved. sim_handle_all will retrieve the configuration for the whole scene
C return value
Configuration data if operation was successful, NULL otherwise. The returned data should be deleted with simReleaseBuffer when not used anymore
Lua synopsis number rawBufferHandle=simGetConfigurationTree(number objectHandle)
Lua parameters
Same as C-function. In addition, child scripts can use the argument sim_handle_self to retrieved the configuration tree of the object that the child script is attached to
Lua return values
rawBufferHandle: handle to a block of raw memory, or -1 in case of an error. Use that value to restore the configuration tree with simSetConfigurationTree. The raw buffer is attached to the script until the simulation ends, at which time it is automatically released. Alternatively, you can release that buffer with the simReleaseScriptRawBuffer-function

All regular API functions on one page