## simGetObjectMatrix

Typically: "How do I... ", "How can I... " questions
eason

### simGetObjectMatrix

Dear administrator,
simGetObjectMatrix ： some elements in this matrix , such as the x-axis of the orientation component is (matrix,matrix,matrix) 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 x-axis of the orientation component is (matrix,matrix,matrix)
The y-axis of the orientation component is (matrix,matrix,matrix)
The z-axis of the orientation component is (matrix,matrix,matrix)
The translation component is (matrix,matrix,matrix)
I am looking forward to giving me a reply at your convenience.
thanks

DannyYeong
Posts: 44
Joined: 24 Feb 2015, 17:06

### Re: simGetObjectMatrix

eason wrote:Dear administrator,
simGetObjectMatrix ： some elements in this matrix , such as the x-axis of the orientation component is (matrix,matrix,matrix) 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 x-axis of the orientation component is (matrix,matrix,matrix)
The y-axis of the orientation component is (matrix,matrix,matrix)
The z-axis of the orientation component is (matrix,matrix,matrix)
The translation component is (matrix,matrix,matrix)
I am looking forward to giving me a reply at your convenience.
thanks
Good day!

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 or  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 1-16, not 0-15 in the 4x4 matrix.

Regards,
Danny

ahundt
Posts: 112
Joined: 29 Jan 2015, 04:21

### 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.