Can you just 'set' the matrix of a scene node(didn't find any accessors)?
The output from the terrain editor I'm using gives a matrix for any (static) object placed on the map, do I
have to extract position, rotation and scale and use setPosition(...) etc. in the node or is there a way to use the matrix directly?
If not, is there a simple way to extract those information from the matrix (my math is a bit rusty^^)?
(BTW right side of matrix isn't clogged by the editor so seems it's always 0,0,0,1)
CMatrix4 seems to have the necessary 'get' methods. I looked at getRotation codeand it seems to get the rotation directly from the matrix (instead of a stored rotation variable).
getTranslation (position) looks like it does the same (although than one is easy). So does getScale....
So maybe load up your matrix from your tool into a CMatrix4 and use the 'get' functions to get the transforms for the scene node?
rotation and scale are interleaved, so you have to apply some more math than what is currently in the matrix class. Going via separated values is definitely simpler.
Hybrid, what exactly do you mean by "separated values"?
I thought that to get the values I'd use some vectors that I'll transform by the
matrix and then extract rotation, position and scale from them, is that what you have in mind?
Put a dummytransformationscenenode as the parent ofthe node you want to transform. You can access the matrix of that node directly. There is a getter method that returns a reference to the underlying transformation matrix.