本文整理匯總了Java中com.google.common.primitives.Ints.concat方法的典型用法代碼示例。如果您正苦於以下問題:Java Ints.concat方法的具體用法?Java Ints.concat怎麽用?Java Ints.concat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.common.primitives.Ints
的用法示例。
在下文中一共展示了Ints.concat方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createBakedQuadCuboid
import com.google.common.primitives.Ints; //導入方法依賴的package包/類
public static List<BakedQuad> createBakedQuadCuboid(float x1, float y1, float z1, float x2, float y2, float z2, TextureAtlasSprite sprite, int red, int green, int blue, int alpha) {
List<BakedQuad> quads = new ArrayList<BakedQuad>();
int color = (alpha & 0x0ff) << 24 | (blue & 0x0ff) << 16 | (green & 0x0ff) << 8 | (red & 0x0ff);
int[] vertexData;
vertexData = Ints.concat(
vertexToInts(x2, y2, z1, color, sprite, x2 * 16, y1 * 16),
vertexToInts(x2, y1, z1, color, sprite, x2 * 16, y2 * 16),
vertexToInts(x1, y1, z1, color, sprite, x1 * 16, y2 * 16),
vertexToInts(x1, y2, z1, color, sprite, x1 * 16, y1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.NORTH, sprite, false, DefaultVertexFormats.BLOCK));
vertexData = Ints.concat(
vertexToInts(x1, y2, z2, color, sprite, x1 * 16, y1 * 16),
vertexToInts(x1, y1, z2, color, sprite, x1 * 16, y2 * 16),
vertexToInts(x2, y1, z2, color, sprite, x2 * 16, y2 * 16),
vertexToInts(x2, y2, z2, color, sprite, x2 * 16, y1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.SOUTH, sprite, false, DefaultVertexFormats.BLOCK));
vertexData = Ints.concat(
vertexToInts(x1, y2, z1, color, sprite, z1 * 16, y1 * 16),
vertexToInts(x1, y1, z1, color, sprite, z1 * 16, y2 * 16),
vertexToInts(x1, y1, z2, color, sprite, z2 * 16, y2 * 16),
vertexToInts(x1, y2, z2, color, sprite, z2 * 16, y1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.WEST, sprite, false, DefaultVertexFormats.BLOCK));
vertexData = Ints.concat(
vertexToInts(x2, y2, z2, color, sprite, z2 * 16, y1 * 16),
vertexToInts(x2, y1, z2, color, sprite, z2 * 16, y2 * 16),
vertexToInts(x2, y1, z1, color, sprite, z1 * 16, y2 * 16),
vertexToInts(x2, y2, z1, color, sprite, z1 * 16, y1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.EAST, sprite, false, DefaultVertexFormats.BLOCK));
vertexData = Ints.concat(
vertexToInts(x2, y1, z1, color, sprite, x2 * 16, z1 * 16),
vertexToInts(x2, y1, z2, color, sprite, x2 * 16, z2 * 16),
vertexToInts(x1, y1, z2, color, sprite, x1 * 16, z2 * 16),
vertexToInts(x1, y1, z1, color, sprite, x1 * 16, z1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.DOWN, sprite, false, DefaultVertexFormats.BLOCK));
vertexData = Ints.concat(
vertexToInts(x1, y2, z1, color, sprite, x1 * 16, z1 * 16),
vertexToInts(x1, y2, z2, color, sprite, x1 * 16, z2 * 16),
vertexToInts(x2, y2, z2, color, sprite, x2 * 16, z2 * 16),
vertexToInts(x2, y2, z1, color, sprite, x2 * 16, z1 * 16));
quads.add(new BakedQuad(vertexData, 0, EnumFacing.UP, sprite, false, DefaultVertexFormats.BLOCK));
return quads;
}