HexMapLibrary
Static Public Member Functions | List of all members
Wunderwunsch.HexMapLibrary.HexGrid.GetTiles Class Reference

Static Public Member Functions

static List< Vector3Int > Disc (Vector3Int center, int radius, bool includeCenter)
 Returns all Tiles which are within distance of the center point, either with or without the center point More...
 
static List< Vector3Int > Ring (Vector3Int center, int radius, int ringThicknessInwards)
 returns all tiles of a ring around center in no defined order More...
 
static List< Vector3Int > Ring (Vector3Int center, int radius, TileDirection startDirection=TileDirection.TopRight, bool clockwise=true)
 returns all tiles of a ring around center in order specified by parameters (startDirection, clockwise) More...
 
static List< Vector3Int > Cone (Vector3Int origin, Vector3Int targetDirection, float coneWidthHalfAngle, int coneLength)
 returns all tiles of a cone starting at a point with given direction, length and width More...
 
static List< Vector3Int > Line (Vector3Int origin, Vector3Int target, bool includeOrigin, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns tiles forming a line between origin and target tile, optionally including the origin tile itself More...
 
static List< Vector3Int > AdjacentToTile (Vector3Int center)
 returns the tiles directly neigbouring the input tile More...
 
static List< Vector3Int > AdjacentToEdge (Vector3Int edge)
 returns the tiles adjacent to the input edge More...
 
static List< Vector3Int > AdjacentToCorner (Vector3Int corner)
 returns the tiles adjacent to the input corner More...
 
static List< List< Vector3Int > > ContiguousAreasOfInputTiles (ICollection< Vector3Int > inputTiles)
 splits the input collection into 1 List for each contiguous area formed by the input tile coordinates. More...
 

Member Function Documentation

◆ Disc()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.Disc ( Vector3Int  center,
int  radius,
bool  includeCenter 
)
static

Returns all Tiles which are within distance of the center point, either with or without the center point

GetTiles_Disc.png
yellow = origin , green = disc tiles, when includeCenter = true the origin is part of the disc

◆ Ring() [1/2]

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.Ring ( Vector3Int  center,
int  radius,
int  ringThicknessInwards 
)
static

returns all tiles of a ring around center in no defined order

GetTiles_Ring.png
yellow = origin , green = ring tiles

◆ Ring() [2/2]

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.Ring ( Vector3Int  center,
int  radius,
TileDirection  startDirection = TileDirection.TopRight,
bool  clockwise = true 
)
static

returns all tiles of a ring around center in order specified by parameters (startDirection, clockwise)

◆ Cone()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.Cone ( Vector3Int  origin,
Vector3Int  targetDirection,
float  coneWidthHalfAngle,
int  coneLength 
)
static

returns all tiles of a cone starting at a point with given direction, length and width

GetTiles_Cone.png
yellow = origin , blue = direction, green/blue = cone tiles

◆ Line()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.Line ( Vector3Int  origin,
Vector3Int  target,
bool  includeOrigin,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)
static

returns tiles forming a line between origin and target tile, optionally including the origin tile itself

TODO: explain nudge

GetTiles_Line.png
yellow = origin , blue = target, yellow/blue = line, when includeOrigin = true the origin belongs is part of the line

◆ AdjacentToTile()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.AdjacentToTile ( Vector3Int  center)
static

returns the tiles directly neigbouring the input tile

GetTiles_AdjacentToTile.png
yellow = origin, green = adjacent tiles

◆ AdjacentToEdge()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.AdjacentToEdge ( Vector3Int  edge)
static

returns the tiles adjacent to the input edge

GetTiles_AdjacentToEdge.png
yellow = input edge, green = adjacent tiles

◆ AdjacentToCorner()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.AdjacentToCorner ( Vector3Int  corner)
static

returns the tiles adjacent to the input corner

GetTiles_AdjacentToCorner.png
yellow = input corner , green = adjacent tiles

◆ ContiguousAreasOfInputTiles()

static List<List<Vector3Int> > Wunderwunsch.HexMapLibrary.HexGrid.GetTiles.ContiguousAreasOfInputTiles ( ICollection< Vector3Int >  inputTiles)
static

splits the input collection into 1 List for each contiguous area formed by the input tile coordinates.

Map_GetTiles_ContiguousCombined.png
left = input tile list , right = output separated into different areas