Re: Confusion about any changes to the Transform3d Matrix4f or Matrifx4D.
Posted by philjord on Aug 18, 2017; 1:01am
URL: https://forum.jogamp.org/Confusion-about-any-changes-to-the-Transform3d-Matrix4f-or-Matrifx4D-tp4038140p4038150.html
m6 is a multiplication of 2 matrix4fs.
Firstly note the Transfrom3D is just a convenience wrapper around a matrix 4x4, it supplies lots of helper functions and can be given to TransformGroups. (Note note it's actually wrapping a column-major double[16] which can be thought of as a matrix 4x4)
For m6 I creates a rotation matrix (in t2) which was a PI rotation (180 degrees) around the X axis (this constructed in the AxisAngle4f(x,y,z,rot)).
Then I constructed a translation matrix (in t) of 10 in +Y ( using the setTranslation())
The I set t2 to be t2*t (in the line t2.mul(t) ) which is exactly the same as multiplying the 2 internal matrices together, then I wrote out the resulting matrix showing the upper 3x3 rotation and the translation column.
In all cases the Transform3D hold 4x4 matrices, and although Matrix3f exists it is very rare to use it in Java3D because it is ambiguous as to whether you are attempting full 2d or rotational 3d maths. I believe this is a key difference to JavaFX where the upper 3x3 can be used either way depending on the domain (2d or 3d).
Finally as you can tell from my simple words and trivial examples I'm no expert in matrix maths and it looks like you are well ahead of me.