Example usage for com.google.common.primitives Ints concat

List of usage examples for com.google.common.primitives Ints concat

Introduction

In this page you can find the example usage for com.google.common.primitives Ints concat.

Prototype

public static int[] concat(int[]... arrays) 

Source Link

Document

Returns the values from each provided array combined into a single array.

Usage

From source file:nova.core.wrapper.mc.forge.v18.wrapper.render.FWSmartModel.java

protected List<BakedQuad> modelToQuads(Model modelIn) {
    return modelIn.flatten().stream().flatMap(model -> {
        if (model instanceof MeshModel) {
            MeshModel meshModel = (MeshModel) model;
            return meshModel.faces.stream().map(face -> {
                List<int[]> vertexData = face.vertices.stream()
                        .map(v -> vertexToInts(v, RenderUtility.instance.getTexture(face.texture.get())))
                        .collect(Collectors.toList());

                int[] data = Ints.concat(vertexData.toArray(new int[][] {}));
                //TODO: The facing might be wrong
                return new BakedQuad(data, -1,
                        EnumFacing.values()[Direction.fromVector(face.normal).ordinal()]);
            });/*from  w w  w .  j a va 2  s .  c o  m*/
        }
        //TODO: Handle BW Rendering
        return Stream.empty();
    }).collect(Collectors.toList());
}

From source file:org.nd4j.linalg.util.ArrayUtil.java

public static float[] toFloats(int[][] ints) {
    return toFloats(Ints.concat(ints));
}

From source file:org.nd4j.linalg.util.ArrayUtil.java

public static double[] toDoubles(int[][] ints) {
    return toDoubles(Ints.concat(ints));
}