private void sliderChangedRecalculateTheMatrix() { double a = sliderZ.getValue() / 1000.0; double b = sliderY.getValue() / 1000.0; double c = sliderX.getValue() / 1000.0; matrixRx.set(MatrixTools.createRotationRxMatrix(c)); matrixRy.set(MatrixTools.createRotationRyMatrix(b)); matrixRz.set(MatrixTools.createRotationRzMatrix(a)); matrix.set(MatrixTools.createRotationMatrix(a, b, c)); parent.refreshCanvas(); }
/*------------------------------------------------------------------*\ |* Methodes Public *| \*------------------------------------------------------------------*/ public void updateMatrix(Matrix matrix, Matrix matrixRz, Matrix matrixRy, Matrix matrixRx) { this.matrix = matrix; this.matrixRz = matrixRz; this.matrixRy = matrixRy; this.matrixRx = matrixRx; double a = MatrixTools.getAlpha(matrixRz); double b = MatrixTools.getBeta(matrixRy); double c = MatrixTools.getGamma(matrixRx); sliderX.setEnabled(true); sliderY.setEnabled(true); sliderZ.setEnabled(true); updateSlider(sliderZ, a * 1000.0); updateSlider(sliderY, b * 1000.0); updateSlider(sliderX, c * 1000.0); }