Okey, its only converting from 3x3 array to 4x4 matrix:
Code Select
private Matrix getRotationMatrix(float[] data) {
Matrix ret = new Matrix();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
ret.set(i, j, data[i * 3 + j]);
}
}
ret.setRow(3, 0, 0, 0, 1);
ret.setColumn(3, 0, 0, 0, 1);
return ret;
}