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

Static Public Member Functions

static List< Vector3Int > OfTile (Vector3Int tile)
 returns the 6 corners of the input tile More...
 
static List< Vector3Int > OfEdge (Vector3Int edge)
 returns the 2 corners adjacent to the input edge More...
 
static List< Vector3Int > AdjacentToCorner (Vector3Int corner)
 returns the 3 corners adjacent to the input corner More...
 
static List< Vector3Int > WithinDistance (Vector3Int centerCorner, int maxDistance, bool includeCenter)
 returns all corners within distance of the input corner - optionally including that corner. More...
 
static List< Vector3Int > AtExactDistance (Vector3Int centerCorner, int distance)
 returns all corners at the exact distance of the input corner. More...
 
static List< Vector3Int > PathAlongGrid (Vector3Int originCorner, Vector3Int targetCorner, bool includeOrigin, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns the shortest path of corners from the origin to the target corner - optionally including the origin More...
 
static List< Vector3Int > TileBorders (IEnumerable< Vector3Int > tiles)
 returns all corners of the input tiles which are adjacent to 1 or 2 tiles not belonging to the input set. More...
 

Member Function Documentation

◆ OfTile()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.OfTile ( Vector3Int  tile)
static

returns the 6 corners of the input tile

GetCorners_OfTile.png
yellow = input tile , blue = result

◆ OfEdge()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.OfEdge ( Vector3Int  edge)
static

returns the 2 corners adjacent to the input edge

GetCorners_AdjacentToEdge.png
green = input edge , blue = result

◆ AdjacentToCorner()

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

returns the 3 corners adjacent to the input corner

GetCorners_AdjacentToCorner.png
green = input corner , blue = result

◆ WithinDistance()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.WithinDistance ( Vector3Int  centerCorner,
int  maxDistance,
bool  includeCenter 
)
static

returns all corners within distance of the input corner - optionally including that corner.

GetCorners_WithinDistance.png
green = input corner , blue = result

◆ AtExactDistance()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.AtExactDistance ( Vector3Int  centerCorner,
int  distance 
)
static

returns all corners at the exact distance of the input corner.

GetCorners_AtExactDistance.png
green = input corner , blue = result

◆ PathAlongGrid()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.PathAlongGrid ( Vector3Int  originCorner,
Vector3Int  targetCorner,
bool  includeOrigin,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)
static

returns the shortest path of corners from the origin to the target corner - optionally including the origin

GetCorners_PathAlongGrid.png
green = origin , purple = target, blue/purple = result - origin can optionally be included

◆ TileBorders()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetCorners.TileBorders ( IEnumerable< Vector3Int >  tiles)
static

returns all corners of the input tiles which are adjacent to 1 or 2 tiles not belonging to the input set.

GetCorners_TileBorders.png
green = input tiles , blue = result