@Test public void testMapAndMergeEmptySpacesByLayer() { int collisionLayerIndex = tiledMap.getLayerIndex("Collisions"); RegionQuadTree<CollisionBox> quadTree = new RegionQuadTree<CollisionBox>(8, 0f, 0f, tiledMap.getWidth() * tiledMap.getTileWidth(), tiledMap.getHeight() * tiledMap.getTileHeight()); collisionBoxMapper = new TiledCollisionMapper<>(new TiledCollisionBoxFactory(), new AllCollisionMerger()); collisionBoxMapper.mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, collisionLayerIndex); Array<CollisionBox> collisions = quadTree.getElementsWithinArea(quadTree); Assert.assertEquals(19, collisions.size); }
public void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName) { mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, tiledMap.getLayerIndex(layerName)); }
TiledCollisionMapper { public void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName) { mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, tiledMap.getLayerIndex(layerName)); } }
TiledCollisionMapper { public void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName) { mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, tiledMap.getLayerIndex(layerName)); } TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger,
			TileMergeMode mergeMode); }
TiledCollisionMapper { public void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName) { mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, tiledMap.getLayerIndex(layerName)); } TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger,
			TileMergeMode mergeMode); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, String layerName); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, int layerIndex); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, TileLayer layer); static byte[][] mapEmptySpacesByLayer(TiledMap tiledMap, String layerName); static byte[][] mapEmptySpacesByLayer(TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapCollisionsByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapCollisionsByObjectGroup(QuadTree<T> quadTree, TiledMap tiledMap, String groupName); void mapCollisionsByObjectGroup(QuadTree<T> quadTree, TiledMap tiledMap, String groupName,
			String objectType); void mapCollisionsByObjectGroup(Array<T> results, TiledMap tiledMap, String groupName); void mapCollisionsByObjectGroup(Array<T> results, TiledMap tiledMap, String groupName, String objectType); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); }
TiledCollisionMapper { public void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName) { mapAndMergeEmptySpacesByLayer(quadTree, tiledMap, tiledMap.getLayerIndex(layerName)); } TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger);  TiledCollisionMapper(TiledCollisionFactory<T> collisionFactory, TiledCollisionMerger collisionMerger,
			TileMergeMode mergeMode); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, String layerName); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, int layerIndex); static byte[][] mapCollisionsByLayer(TiledMap tiledMap, TileLayer layer); static byte[][] mapEmptySpacesByLayer(TiledMap tiledMap, String layerName); static byte[][] mapEmptySpacesByLayer(TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapCollisionsByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapCollisionsByObjectGroup(QuadTree<T> quadTree, TiledMap tiledMap, String groupName); void mapCollisionsByObjectGroup(QuadTree<T> quadTree, TiledMap tiledMap, String groupName,
			String objectType); void mapCollisionsByObjectGroup(Array<T> results, TiledMap tiledMap, String groupName); void mapCollisionsByObjectGroup(Array<T> results, TiledMap tiledMap, String groupName, String objectType); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapAndMergeCollisionsByLayer(QuadTree<T> quadTree, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, String layerName); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, int layerIndex); void mapAndMergeEmptySpacesByLayer(QuadTree<T> quadTree, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapAndMergeCollisionsByLayer(Array<T> results, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, String layerName); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, int layerIndex); void mapAndMergeEmptySpacesByLayer(Array<T> results, TiledMap tiledMap, final int layerIndex,
			final int maxColumns, final int maxRows);  }