# Horde3D

Next-Generation Graphics Engine
 It is currently 21.04.2019, 19:12

 All times are UTC + 1 hour

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: h3dGetNodeTransMats tx ty tzPosted: 19.03.2014, 11:45

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?

Rich

Top

 Post subject: Re: h3dGetNodeTransMats tx ty tzPosted: 19.03.2014, 15:22
 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

 Post subject: Re: h3dGetNodeTransMats tx ty tzPosted: 19.03.2014, 15:47

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

 Post subject: Re: h3dGetNodeTransMats tx ty tzPosted: 19.03.2014, 20:33
 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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC + 1 hour

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ Horde3D Usage    General Discussion    Support    Bug Reports    Asset Creation    Showcase    Advanced Rendering Techniques    Tools    Free Discussion Horde3D Development    Developer Discussion