Regular API function

simGetRotationAxis / sim.getRotationAxis

Description Retrieves an axis and rotation angle that brings one pose or transformation matrix onto another one. The translation part of the poses/matrices is ignored. This function, when used in combination with sim.rotateAroundAxis, can be used to build interpolations between transformation matrices. See also the section about positions, orientations and transformations
C/C++
synopsis
simInt simGetRotationAxis(const simFloat* matrixStart,const simFloat* matrixGoal,simFloat* axis,simFloat* angle)
C/C++
parameters
matrixStart: the start transformation matrix
matrixGoal: the goal transformation matrix
axis: the returned rotation axis in absolute coordinates
angle: the returned rotation angle
C/C++
return value
-1 if operation was not successful
Lua
synopsis
float[3] axis,float angle=sim.getRotationAxis(float[7]/float[12] poseStart/matrixStart,float[7]/float[12] poseGoal/matrixGoal)
Lua
parameters
poseStart/matrixStart: the start pose or transformation matrix
poseGoal/matrixGoal: the goal pose or transformation matrix
Lua
return values
axis: the rotation axis in absolute coordinates
angle: the rotation angle
Python
synopsis
list axis,float angle=sim.getRotationAxis(list poseStart/matrixStart,list poseGoal/matrixGoal)

<