Dear administrator,
simGetObjectMatrix ： some elements in this matrix , such as the xaxis of the orientation component is (matrix[0],matrix[4],matrix[8]) in the definition. what does the orientation component concretely represent ? what does the
translation component mean?
Definition:
matrix: pointer to 12 simFloat values (the last row of the 4x4 matrix (0,0,0,1) is not needed)
The xaxis of the orientation component is (matrix[0],matrix[4],matrix[8])
The yaxis of the orientation component is (matrix[1],matrix[5],matrix[9])
The zaxis of the orientation component is (matrix[2],matrix[6],matrix[10])
The translation component is (matrix[3],matrix[7],matrix[11])
I am looking forward to giving me a reply at your convenience.
thanks
simGetObjectMatrix

 Posts: 44
 Joined: 24 Feb 2015, 17:06
Re: simGetObjectMatrix
Good day!eason wrote:Dear administrator,
simGetObjectMatrix ： some elements in this matrix , such as the xaxis of the orientation component is (matrix[0],matrix[4],matrix[8]) in the definition. what does the orientation component concretely represent ? what does the
translation component mean?
Definition:
matrix: pointer to 12 simFloat values (the last row of the 4x4 matrix (0,0,0,1) is not needed)
The xaxis of the orientation component is (matrix[0],matrix[4],matrix[8])
The yaxis of the orientation component is (matrix[1],matrix[5],matrix[9])
The zaxis of the orientation component is (matrix[2],matrix[6],matrix[10])
The translation component is (matrix[3],matrix[7],matrix[11])
I am looking forward to giving me a reply at your convenience.
thanks
I've used this command in my project as a way to retrieve the object's transformation matrix. Do you know how a transformation matrix works? The 4x4 matrix represents the transformation of an object prior to its attached frame. This matrix will numerically tell you what's the object's orientation and translation position in the scene.
Those callings such as matrix[0] or [1] etc are a way to retrieve any desired values from the 4x4 matrix.
You could do some research on transformation matrix to understand how the matrix works, and that'll give you a better understanding on orientation and translation. A side note to take: If you are retrieving the values from an object, the return values are counted from 116, not 015 in the 4x4 matrix.
Regards,
Danny
Re: simGetObjectMatrix
Here is a good link that explains the concept:
https://studywolf.wordpress.com/?s=robot+control+part+1
There are 6 more parts to that tutorial that get more advanced as things go on.
https://studywolf.wordpress.com/?s=robot+control+part+1
There are 6 more parts to that tutorial that get more advanced as things go on.