Regular API function

simGetDataOnPath / sim.getDataOnPath

Description Retrieves interpolated user data along a path object. See also sim.getPositionOnPath, sim.getOrientationOnPath, sim.getPathPosition and sim.getClosestPositionOnPath.
C synopsis simInt simGetDataOnPath(simInt pathHandle,simFloat relativeDistance,simInt dataType,simInt* intData,simFloat* floatData)
C parameters
pathHandle: handle of the path object
relativeDistance: a value between 0 and 1, where 0 is the beginning of the path, and 1 the end of the path. Make sure you selected the appropriate path length calculation method. See also simGetPathLength. In order to retrieve data that lies exactly on a specific path control point, specify following for relativeDistance: -ctrlPtIndex-1 (the value will be rounded appropriately).
dataType: the type of the desired data. Keep 0.
intData: pointer to a one-dimensional array that will receive the auxiliary flags value at the given path relative distance.
floatData: pointer to a 4-dimensional array that will receive the auxiliary channel values at the given path relative distance.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number auxFlags,table_4 auxChannels=sim.getDataOnPath(number pathHandle,number relativeDistance)
Lua parameters
Same as C-function
Lua return values
Similar as C-function

All regular API functions on one page