private void setTransformation(final Matrix4f m, final Vector3f center, final boolean setMatrixField) { origin.set(center); try { final AxisAngle4f rot = new AxisAngle4f(); decompose(m, origin, rot, translation); angle = (float) (180 * rot.getAngle() / Math.PI); axis.x = rot.x; axis.y = rot.y; axis.z = rot.z; // update textfields axisTF.setText(toString(axis)); angleTF.setText(Float.toString(angle)); originTF.setText(toString(origin)); translationTF.setText(toString(translation)); if (setMatrixField) matrixTA.setText(toString(m)); transformationUpdated(m); } catch (final Exception e) { System.out.println(e.getMessage()); } }