Package net.sf.gridarta.model.floodfill
Class FillUtils
- java.lang.Object
-
- net.sf.gridarta.model.floodfill.FillUtils
-
public class FillUtils extends java.lang.ObjectUtility class implementing fill operations on map instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
voidfill(@NotNull MapModel<G,A,R> mapModel, @NotNull java.util.Collection<MapSquare<G,A,R>> selection, @NotNull InsertionMode insertionMode, @NotNull java.util.List<? extends BaseObject<G,A,R,?>> gameObjects, int density, boolean noAdjacent)Fills a set of squares in a map.static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
voidfloodFill(@NotNull MapModel<G,A,R> mapModel, @NotNull java.awt.Point start, @NotNull java.util.List<? extends BaseObject<G,A,R,?>> gameObjects, @NotNull InsertionModeSet<G,A,R> insertionModeSet)Flood-fill the the map, starting at the cursor position.
-
-
-
Method Detail
-
fill
public static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> void fill(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull java.util.Collection<MapSquare<G,A,R>> selection, @NotNull @NotNull InsertionMode insertionMode, @NotNull @NotNull java.util.List<? extends BaseObject<G,A,R,?>> gameObjects, int density, boolean noAdjacent)
Fills a set of squares in a map.- Parameters:
mapModel- the map to fillselection- the squares to fillinsertionMode- the insertion mode to usegameObjects- the game objects to fill withdensity- the fill density in percent; -1 to disablenoAdjacent- whether squares are skipped if an adjacent squares is not free
-
floodFill
public static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> void floodFill(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull java.awt.Point start, @NotNull @NotNull java.util.List<? extends BaseObject<G,A,R,?>> gameObjects, @NotNull @NotNull InsertionModeSet<G,A,R> insertionModeSet)
Flood-fill the the map, starting at the cursor position.- Parameters:
mapModel- the map to fillstart- the starting locationgameObjects- the game objects to fill withinsertionModeSet- the insertion mode set to use
-
-