Regular API function

simInsertPathCtrlPoints

Description Inserts one or several control points into a path object. See also simCutPathCtrlPoints and simCreatePath.
C synopsis simInt simInsertPathCtrlPoints(simInt pathHandle,simInt options,simInt startIndex,simInt ptCnt,const simVoid* ptData)
C parameters
pathHandle: the handle of the path. Refer also to simGetObjectHandle.
options: bit-coded:
bit0: if set (1), then the path will be closed (given that there are enough control points in the path)
bit1: if set (2), then the expected value count (valCnt) for each point will be 16 instead of 11 (see further down)
startIndex: the zero-based index where the first new control point should be inserted.
ptCnt: the number of control points to insert.
ptData (input): a buffer of ptCnt*valCnt values (float or int). ValCnt is 16 if bit1 of options is set, otherwise 11. Each new control point should have its properties described with following valCnt values:
ptData[0]-ptData[2] (float values): the position of the control point (x,y,z), relative to the path object
ptData[3]-ptData[5] (float values): the orientation of the control point in Euler angles (alpha,beta,gamma), relative to the path object
ptData[6] (float value): the relative velocity at the control point
ptData[7] (float value): the virtual distance at the control point
ptData[8] (int value): the number of Bezier points at the control point
ptData[9] (float value): the Bezier interpolation factor 1 at the control point
ptData[10] (float value): the Bezier interpolation factor 2 at the control point
ptData[11] (int value): the auxiliary flags at the control point
ptData[12]-ptData[15] (float values): the 4 auxiliary values at the control point
C return value
-1 if operation was not successful.
Lua synopsis number result=simInsertPathCtrlPoints(number pathHandle,number options,number startIndex,number ptCnt,table ptData)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page