public ModelInfluencer (ModelInfluencer influencer) { this((Model[])influencer.models.toArray(Model.class)); }
public DynamicsInfluencer (DynamicsInfluencer velocityInfluencer) { this((DynamicsModifier[])velocityInfluencer.velocities.toArray(DynamicsModifier.class)); }
public DynamicsInfluencer (DynamicsInfluencer velocityInfluencer) { this((DynamicsModifier[])velocityInfluencer.velocities.toArray(DynamicsModifier.class)); }
public ModelInfluencer (ModelInfluencer influencer) { this((Model[])influencer.models.toArray(Model.class)); }
/** Returns the items as an array. Note the array is typed, so the {@link #Array(Class)} constructor must have been used. * Otherwise use {@link #toArray(Class)} to specify the array type. */ public T[] toArray () { return (T[])toArray(items.getClass().getComponentType()); }
/** Returns the items as an array. Note the array is typed, so the {@link #Array(Class)} constructor must have been used. * Otherwise use {@link #toArray(Class)} to specify the array type. */ public T[] toArray () { return (T[])toArray(items.getClass().getComponentType()); }
void print (String message) { String[] lines = console.getItems().toArray(String.class); String[] newLines = new String[lines.length + 1]; System.arraycopy(lines, 0, newLines, 0, lines.length); newLines[newLines.length - 1] = message; console.setItems(newLines); scrollPane.invalidate(); scrollPane.validate(); scrollPane.setScrollPercentY(1.0f); }
@Override public void write (Json json) { json.writeValue("unique", uniqueData, ObjectMap.class); json.writeValue("data", data, Array.class, SaveData.class); json.writeValue("assets", sharedAssets.toArray(AssetData.class), AssetData[].class); json.writeValue("resource", resource, null); }
@Override public void write (Json json) { json.writeValue("unique", uniqueData, ObjectMap.class); json.writeValue("data", data, Array.class, SaveData.class); json.writeValue("assets", sharedAssets.toArray(AssetData.class), AssetData[].class); json.writeValue("resource", resource, null); }
@Override public void onRegionsSelected (Array<TextureRegion> regions) { regionSelectDialog.setVisible(false); if(regions.size == 0) return; value.clear(); value.add((TextureRegion[])regions.toArray(TextureRegion.class)); editor.setTexture(regions.get(0).getTexture()); editor.restart(); }
@Override public void onRegionsSelected (Array<TextureRegion> regions) { regionSelectDialog.setVisible(false); if(regions.size == 0) return; value.clear(); value.add((TextureRegion[])regions.toArray(TextureRegion.class)); editor.setTexture(regions.get(0).getTexture()); editor.restart(); }
public static void convert (String input, String output, boolean genMipmaps, boolean packETC1, boolean genAlphaAtlas) throws Exception { Array<String> opts = new Array<String>(String.class); opts.add(input); opts.add(output); if (genMipmaps) opts.add("-mipmaps"); if (packETC1 && !genAlphaAtlas) opts.add("-etc1"); if (packETC1 && genAlphaAtlas) opts.add("-etc1a"); main(opts.toArray()); }
public static void convert (String input, String output, boolean genMipmaps, boolean packETC1, boolean genAlphaAtlas) throws Exception { Array<String> opts = new Array<String>(String.class); opts.add(input); opts.add(output); if (genMipmaps) opts.add("-mipmaps"); if (packETC1 && !genAlphaAtlas) opts.add("-etc1"); if (packETC1 && genAlphaAtlas) opts.add("-etc1a"); main(opts.toArray()); }
private VertexAttribute[] parseAttributes (JsonValue attributes) { Array<VertexAttribute> vertexAttributes = new Array<VertexAttribute>(); int unit = 0; int blendWeightCount = 0; for (JsonValue value = attributes.child; value != null; value = value.next) { String attribute = value.asString(); String attr = (String)attribute; if (attr.equals("POSITION")) { vertexAttributes.add(VertexAttribute.Position()); } else if (attr.equals("NORMAL")) { vertexAttributes.add(VertexAttribute.Normal()); } else if (attr.equals("COLOR")) { vertexAttributes.add(VertexAttribute.ColorUnpacked()); } else if (attr.equals("COLORPACKED")) { vertexAttributes.add(VertexAttribute.ColorPacked()); } else if (attr.equals("TANGENT")) { vertexAttributes.add(VertexAttribute.Tangent()); } else if (attr.equals("BINORMAL")) { vertexAttributes.add(VertexAttribute.Binormal()); } else if (attr.startsWith("TEXCOORD")) { vertexAttributes.add(VertexAttribute.TexCoords(unit++)); } else if (attr.startsWith("BLENDWEIGHT")) { vertexAttributes.add(VertexAttribute.BoneWeight(blendWeightCount++)); } else { throw new GdxRuntimeException("Unknown vertex attribute '" + attr + "', should be one of position, normal, uv, tangent or binormal"); } } return vertexAttributes.toArray(VertexAttribute.class); }
private VertexAttribute[] parseAttributes (JsonValue attributes) { Array<VertexAttribute> vertexAttributes = new Array<VertexAttribute>(); int unit = 0; int blendWeightCount = 0; for (JsonValue value = attributes.child; value != null; value = value.next) { String attribute = value.asString(); String attr = (String)attribute; if (attr.equals("POSITION")) { vertexAttributes.add(VertexAttribute.Position()); } else if (attr.equals("NORMAL")) { vertexAttributes.add(VertexAttribute.Normal()); } else if (attr.equals("COLOR")) { vertexAttributes.add(VertexAttribute.ColorUnpacked()); } else if (attr.equals("COLORPACKED")) { vertexAttributes.add(VertexAttribute.ColorPacked()); } else if (attr.equals("TANGENT")) { vertexAttributes.add(VertexAttribute.Tangent()); } else if (attr.equals("BINORMAL")) { vertexAttributes.add(VertexAttribute.Binormal()); } else if (attr.startsWith("TEXCOORD")) { vertexAttributes.add(VertexAttribute.TexCoords(unit++)); } else if (attr.startsWith("BLENDWEIGHT")) { vertexAttributes.add(VertexAttribute.BoneWeight(blendWeightCount++)); } else { throw new GdxRuntimeException("Unknown vertex attribute '" + attr + "', should be one of position, normal, uv, tangent or binormal"); } } return vertexAttributes.toArray(VertexAttribute.class); }
cache.textures = textures.toArray(Texture.class); cache.counts = new int[cache.textureCount]; for (int i = 0, n = counts.size; i < n; i++)
public static void convert (String inPx, String inNx, String inPy, String inNy, String inPz, String inNz, String output, boolean genMipmaps, boolean packETC1, boolean genAlphaAtlas) throws Exception { Array<String> opts = new Array<String>(String.class); opts.add(inPx); opts.add(inNx); opts.add(inPy); opts.add(inNy); opts.add(inPz); opts.add(inNz); opts.add(output); if (genMipmaps) opts.add("-mipmaps"); if (packETC1 && !genAlphaAtlas) opts.add("-etc1"); if (packETC1 && genAlphaAtlas) opts.add("-etc1a"); main(opts.toArray()); }
public static void convert (String inPx, String inNx, String inPy, String inNy, String inPz, String inNz, String output, boolean genMipmaps, boolean packETC1, boolean genAlphaAtlas) throws Exception { Array<String> opts = new Array<String>(String.class); opts.add(inPx); opts.add(inNx); opts.add(inPy); opts.add(inNy); opts.add(inPz); opts.add(inNz); opts.add(output); if (genMipmaps) opts.add("-mipmaps"); if (packETC1 && !genAlphaAtlas) opts.add("-etc1"); if (packETC1 && genAlphaAtlas) opts.add("-etc1a"); main(opts.toArray()); }
parts.add(jsonPart); jsonMesh.parts = parts.toArray(ModelMeshPart.class); model.meshes.add(jsonMesh);
parts.add(jsonPart); jsonMesh.parts = parts.toArray(ModelMeshPart.class); model.meshes.add(jsonMesh);