
Regular API function
simRotateAroundAxis / sim.rotateAroundAxis
Description
|
Rotates a transformation matrix around a random axis in space. This function, when used in combination with sim.getRotationAxis, can be used to build interpolations between transformation matrices. See also sim.getObjectMatrix, sim.setObjectMatrix and the other matrix/transformation functions. |
C/C++ synopsis
|
simInt simRotateAroundAxis(const simFloat* matrixIn,const simFloat* axis,const simFloat* axisPos,simFloat angle,simFloat* matrixOut)
|
C/C++ parameters |
matrixIn: the transformation matrix to rotate
axis: the axis vector in absolute coordinates to rotate around
axisPos: the position of the rotation axis in absolute coordinates
angle: the amount of rotation to perform
matrixOut: the returned transformed (rotated) matrix
|
C/C++ return value
|
-1 if operation was not successful
|
Lua synopsis
|
float[12] matrixOut=sim.rotateAroundAxis(float[12] matrixIn,float[3] axis,float[3] axisPos,float angle)
|
Lua parameters |
Similar to the C-function counterpart
|
Lua return values
|
matrixOut: the transformed (rotated) matrix, or nil in case of an error
|
Python synopsis |
list matrixOut=sim.rotateAroundAxis(list matrixIn,list axis,list axisPos,float angle) |
|