public static double[][] getRotationFromTransform(double[][] matrix) {

		double xx = matrix[0][0];
		double xy = matrix[0][1];
		double xz = matrix[0][2];

		double yx = matrix[1][0];
		double yy = matrix[1][1];
		double yz = matrix[1][2];

		double zx = matrix[2][0];
		double zy = matrix[2][1];
		double zz = matrix[2][2];

		double[][] rotation = new double[][] { new double[] { xx, xy, xz },
				new double[] { yx, yy, yz }, new double[] { zx, zy, zz } };

		return rotation;

	}