Horde3D

Next-Generation Graphics Engine
It is currently 26.08.2019, 03:36

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 19.03.2014, 11:45 
Offline

Joined: 01.11.2013, 11:39
Posts: 14
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


Top
 Profile  
Reply with quote  
PostPosted: 19.03.2014, 15:22 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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


Top
 Profile  
Reply with quote  
PostPosted: 19.03.2014, 15:47 
Offline

Joined: 01.11.2013, 11:39
Posts: 14
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


Top
 Profile  
Reply with quote  
PostPosted: 19.03.2014, 20:33 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group