Horde3D
http://horde3d.org/forums/

h3dGetNodeTransMats tx ty tz
http://horde3d.org/forums/viewtopic.php?f=2&t=2251
Page 1 of 1

Author:  72deluxe [ 19.03.2014, 11:45 ]
Post subject:  h3dGetNodeTransMats tx ty tz

Hello!

I see on the wiki that elements 12, 13 and 14 of the absolute transformation matrix are the tx, ty and tz elements of a node.
Which elements of the matrix correspond to the size and rotation elements, that is, the rx, ry, rz and sx, sy, sz elements?

The matrix is column major, correct?

Thanks in advance
Rich

Author:  Volker [ 19.03.2014, 15:22 ]
Post subject:  Re: h3dGetNodeTransMats tx ty tz

rotation is a 3x3 matrix in the elements
0,1,2
3,4,5
6,7,8

And scale should be along the elements 0,4,8 but are not mapped 1:1 as the scaling matrix is influenced by the rotation so as you can see in Matrix4f::decompose the scale is encoded in the columns.

Regarding row/column major I would stick to http://stackoverflow.com/questions/1771 ... lumn-major

Author:  72deluxe [ 19.03.2014, 15:47 ]
Post subject:  Re: h3dGetNodeTransMats tx ty tz

Hello

Thanks for the reply. I was wondering why the 0 4 and 8 elements were a bit odd. From your explanation, am I right in thinking that rx = element 2, ry = element 4, and rz = element 9, or am I misunderstanding?

Also, is there a corresponding function to set the absolute positions? I only see functions performing relative positioning.

Thanks again
Rich

Author:  Volker [ 19.03.2014, 20:33 ]
Post subject:  Re: h3dGetNodeTransMats tx ty tz

The absolute matrix always depends on the parent node, so no you can't set the absolute matrix of a node. Apart from the special root node case that does not have a parent, so in that case setting the relative matrix is equal to setting an absolute matrix.
The rotation can not be mapped to a single element in the transformation matrix, that's why I said the rotation is a 3x3 matrix defined by the elements mentioned above.
Maybe things will be easier to understand by looking at the decompose function of Matrix4f.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/