/** Frees all obtained instances. */ public void flush () { super.freeAll(obtained); obtained.clear(); }
private void clearDebugRects () { if (debugRects == null) return; DebugRect.pool.freeAll(debugRects); debugRects.clear(); }
/** Frees all obtained instances. */ public void flush () { super.freeAll(obtained); obtained.clear(); }
public void flush () { super.freeAll(obtained); obtained.clear(); } }
@Override public void freeAll (Array<T> objects) { obtained.removeAll(objects, true); super.freeAll(objects); } }
private void clearDebugRects () { if (debugRects == null) return; DebugRect.pool.freeAll(debugRects); debugRects.clear(); }
public void flush () { super.freeAll(obtained); obtained.clear(); } }
@Override public void freeAll (Array<T> objects) { obtained.removeAll(objects, true); super.freeAll(objects); } }
/** Remove all decals from batch */ protected void clear () { groupList.clear(); groupPool.freeAll(usedGroups); usedGroups.clear(); }
/** Returns a list of {@link GridPoint2} instances along the given line, at integer coordinates. * @param startX the start x coordinate of the line * @param startY the start y coordinate of the line * @param endX the end x coordinate of the line * @param endY the end y coordinate of the line * @return the list of points on the line at integer coordinates */ public Array<GridPoint2> line (int startX, int startY, int endX, int endY) { pool.freeAll(points); points.clear(); return line(startX, startY, endX, endY, pool, points); }
/** Returns a list of {@link GridPoint2} instances along the given line, at integer coordinates. * @param startX the start x coordinate of the line * @param startY the start y coordinate of the line * @param endX the end x coordinate of the line * @param endY the end y coordinate of the line * @return the list of points on the line at integer coordinates */ public Array<GridPoint2> line (int startX, int startY, int endX, int endY) { pool.freeAll(points); points.clear(); return line(startX, startY, endX, endY, pool, points); }
/** Remove all decals from batch */ protected void clear () { groupList.clear(); groupPool.freeAll(usedGroups); usedGroups.clear(); }
public void reset () { Pools.get(GlyphRun.class).freeAll(runs); runs.clear(); width = 0; height = 0; }
public void reset () { Pools.get(GlyphRun.class).freeAll(runs); runs.clear(); width = 0; height = 0; }
public static btCollisionShape obtainStaticNodeShape (final Node node, final boolean applyTransform) { getShapeParts(node, applyTransform, shapePartArray, 0, shapePartPool); btCollisionShape result = obtainStaticShape(shapePartArray); shapePartPool.freeAll(shapePartArray); shapePartArray.clear(); return result; }
public static btCollisionShape obtainStaticNodeShape (final Node node, final boolean applyTransform) { getShapeParts(node, applyTransform, shapePartArray, 0, shapePartPool); btCollisionShape result = obtainStaticShape(shapePartArray); shapePartPool.freeAll(shapePartArray); shapePartArray.clear(); return result; }
/** Obtain a {@link btCollisionShape} based on the specified nodes, which can be used for a static body but not for a dynamic * body. Depending on the specified nodes the result will be either a {@link btBvhTriangleMeshShape} or a * {@link btCompoundShape} of multiple btBvhTriangleMeshShape's. Where possible, the same btBvhTriangleMeshShape will be reused * if multiple nodes use the same (mesh) part. The node transformation (translation and rotation) will be included, but scaling * will be ignored. * @param nodes The nodes for which to obtain a node, typically this would be: `model.nodes`. * @return The obtained shape, if you're using reference counting then you can release the shape when no longer needed. */ public static btCollisionShape obtainStaticNodeShape (final Array<Node> nodes) { getShapeParts(nodes, shapePartArray, 0, shapePartPool); btCollisionShape result = obtainStaticShape(shapePartArray); shapePartPool.freeAll(shapePartArray); shapePartArray.clear(); return result; }
/** Obtain a {@link btCollisionShape} based on the specified nodes, which can be used for a static body but not for a dynamic * body. Depending on the specified nodes the result will be either a {@link btBvhTriangleMeshShape} or a * {@link btCompoundShape} of multiple btBvhTriangleMeshShape's. Where possible, the same btBvhTriangleMeshShape will be reused * if multiple nodes use the same (mesh) part. The node transformation (translation and rotation) will be included, but scaling * will be ignored. * @param nodes The nodes for which to obtain a node, typically this would be: `model.nodes`. * @return The obtained shape, if you're using reference counting then you can release the shape when no longer needed. */ public static btCollisionShape obtainStaticNodeShape (final Array<Node> nodes) { getShapeParts(nodes, shapePartArray, 0, shapePartPool); btCollisionShape result = obtainStaticShape(shapePartArray); shapePartPool.freeAll(shapePartArray); shapePartArray.clear(); return result; }
/** Removes all actors and cells from the table. */ public void clearChildren () { Array<Cell> cells = this.cells; for (int i = cells.size - 1; i >= 0; i--) { Cell cell = cells.get(i); Actor actor = cell.actor; if (actor != null) actor.remove(); } cellPool.freeAll(cells); cells.clear(); rows = 0; columns = 0; if (rowDefaults != null) cellPool.free(rowDefaults); rowDefaults = null; implicitEndRow = false; super.clearChildren(); }
private void getTiles (int startX, int startY, int endX, int endY, Array<Rectangle> tiles) { TiledMapTileLayer layer = (TiledMapTileLayer)map.getLayers().get("walls"); rectPool.freeAll(tiles); tiles.clear(); for (int y = startY; y <= endY; y++) { for (int x = startX; x <= endX; x++) { Cell cell = layer.getCell(x, y); if (cell != null) { Rectangle rect = rectPool.obtain(); rect.set(x, y, 1, 1); tiles.add(rect); } } } }