/** @see #FloatArray(float[]) */ static public FloatArray with (float... array) { return new FloatArray(array); } }
/** @see #FloatArray(float[]) */ static public FloatArray with (float... array) { return new FloatArray(array); } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
prefWidth = 0; if (rowSizes == null) rowSizes = new FloatArray(); else rowSizes.clear();
prefWidth = 0; if (rowSizes == null) rowSizes = new FloatArray(); else rowSizes.clear();
prefHeight = 0; if (columnSizes == null) columnSizes = new FloatArray(); else columnSizes.clear();
prefHeight = 0; if (columnSizes == null) columnSizes = new FloatArray(); else columnSizes.clear();
@Override public void create () { stage = new Stage(); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); //Create a string that perfectly fills the float array used in the textarea float array FloatArray dummyArray = new FloatArray(); String limit = ""; // Minus one, because TextField adds a magic char for (int i = 0; i < dummyArray.items.length-1; i++) { limit += "a"; } TextArea textArea = new TextArea( limit, skin); textArea.setX(10); textArea.setY(10); textArea.setWidth(200); textArea.setHeight(200); stage.addActor(textArea); }
/** @see #FloatArray(float[]) */ static public FloatArray with (float... array) { return new FloatArray(array); } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
/** Returns a new array containing the remaining values. */ public FloatArray toArray () { FloatArray array = new FloatArray(true, map.size); while (hasNext) array.add(next()); return array; } }
@Override public void load() { // load height data from terra file final FloatArray floatArray = new FloatArray(); DataInputStream is; try { is = new DataInputStream(file.read()); while (is.available() > 0) { floatArray.add(is.readFloat()); } is.close(); } catch (EOFException e) { // e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); return; } data = floatArray.toArray(); terrain = new Terrain(meta.getTerrain().getSize(), data); terrain.init(); terrain.update(); }
startY = new float[rays]; this.chain = (chain != null) ? new FloatArray(chain) : new FloatArray();
public static void splitPolygon(PolygonFixtureDefModel object) { object.vertices.clear(); final FloatArray vertices = new FloatArray(); for (Vector2 v : object.polygon) { vertices.add(v.x); vertices.add(v.y); } ShortArray temp = earClippingTriangulator.computeTriangles(vertices); for (int i = 0; i < temp.size; i += 3) { Vector2[] vv = new Vector2[3]; vv[0] = new Vector2(vertices.get(2 * temp.get(i)), vertices.get(2 * temp.get(i) + 1)); vv[1] = new Vector2(vertices.get(2 * temp.get(i + 1)), vertices.get(2 * temp.get(i + 1) + 1)); vv[2] = new Vector2(vertices.get(2 * temp.get(i + 2)), vertices.get(2 * temp.get(i + 2) + 1)); if (Mathutils.isClockwise(vv[0], vv[1], vv[2])) { Vector2 vt = vv[0]; vv[0] = vv[2]; vv[2] = vt; } object.vertices.add(vv); } }
startY = new float[rays]; this.chain = (chain != null) ? new FloatArray(chain) : new FloatArray();
cs.skeleton.getBounds(offset, size, new FloatArray()); width = size.x; height = size.y;
final float sin = MathUtils.sinDeg(angle); final FloatArray vertices = new FloatArray();