Regular API function

simGetJointMatrix / sim.getJointMatrix

Description Retrieves the intrinsic transformation matrix of a joint (the transformation caused by the joint movement). See also sim.setSphericalJointMatrix.
C synopsis simInt simGetJointMatrix(simInt objectHandle,simFloat* matrix)
C parameters
objectHandle: handle of the joint
matrix: pointer to 12 simFloat values (the last row of the 4x4 matrix (0,0,0,1) is not needed)
The x-axis of the orientation component is (matrix[0],matrix[4],matrix[8])
The y-axis of the orientation component is (matrix[1],matrix[5],matrix[9])
The z-axis of the orientation component is (matrix[2],matrix[6],matrix[10])
The translation component is (matrix[3],matrix[7],matrix[11])
C return value
-1 if operation was not successful
Lua synopsis table[12] matrix=sim.getJointMatrix(int objectHandle)
Lua parameters
objectHandle: handle of the joint
Lua return values
matrix: table of 12 numbers (the last row of the 4x4 matrix (0,0,0,1) is not returned)
Remote API equiv.
B0-based remote API: -
Legacy remote API: simxGetJointMatrix