private String transformationStr(Transformation trf) { NumberFormat fmt = FloatFormat.getInstance(); Matrix matrix = trf.matrix(); Vector vector = trf.vector(); return "matrix <" + fmt.format(matrix.get(Transformation.X, Transformation.X)) + "," + fmt.format(matrix.get(Transformation.Z, Transformation.X)) + "," + fmt.format(matrix.get(Transformation.Y, Transformation.X)) + "," + fmt.format(matrix.get(Transformation.X, Transformation.Z)) + "," + fmt.format(matrix.get(Transformation.Z, Transformation.Z)) + "," + fmt.format(matrix.get(Transformation.Y, Transformation.Z)) + "," + fmt.format(matrix.get(Transformation.X, Transformation.Y)) + "," + fmt.format(matrix.get(Transformation.Z, Transformation.Y)) + "," + fmt.format(matrix.get(Transformation.Y, Transformation.Y)) + "," + fmt.format(vector.getX()) + "," + fmt.format(vector.getZ()) + "," + fmt.format(vector.getY()) + ">"; }
private String vectorStr(Vector v) { NumberFormat fmt = FloatFormat.getInstance(); return "<" + fmt.format(v.getX()) + "," + fmt.format(v.getZ()) + "," + fmt.format(v.getY()) + ">"; }