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

Static Public Member Functions

static List< Vector3Int > OfTile (Vector3Int tile)
 returns the 6 edges of a tile More...
 
static List< Vector3Int > AdjacentToEdge (Vector3Int edge)
 returns the 4 edges which are adjacent to an edge More...
 
static List< Vector3Int > AdjacentToCorner (Vector3Int corner)
 returns the 3 edges which share the input corner More...
 
static List< Vector3Int > WithinDistanceOfEdge (Vector3Int centerEdge, int maxDistance, bool includeCenter)
 returns all edges with are within the specified range of the input edge (either with or without the center itself) More...
 
static List< Vector3Int > WithinDistanceOfCorner (Vector3Int centerCorner, int maxDistance)
 returns all edges with are within the specified range of the input corner More...
 
static List< Vector3Int > AtExactDistance (Vector3Int centeredge, int distance)
 returns all the edges with are exactly at the specified distance of the input edge More...
 
static List< Vector3Int > PathBetweenCorners (Vector3Int originCorner, Vector3Int targetCorner, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns the shortest path of edges from origin to target corner More...
 
static List< Vector3Int > TileBorders (IEnumerable< Vector3Int > tiles)
 returns all the border edges of a set of tiles. More...
 
static List< List< Vector3Int > > BorderPaths (IEnumerable< Vector3Int > tiles, out List< List< EdgeDirection >> pathDirections)
 returns all the border paths of one contiguous Area. Outer path is clockwise, others are counterclockwise More...
 

Member Function Documentation

◆ OfTile()

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

returns the 6 edges of a tile

GetEdges_OfTile.png
yellow = input tile , blue = result

◆ AdjacentToEdge()

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

returns the 4 edges which are adjacent to an edge

GetEdges_AdjacentToEdge.png
green = input edge , blue = result

◆ AdjacentToCorner()

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

returns the 3 edges which share the input corner

GetEdges_AdjacentToCorner.png
green = input corner , blue = result

◆ WithinDistanceOfEdge()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetEdges.WithinDistanceOfEdge ( Vector3Int  centerEdge,
int  maxDistance,
bool  includeCenter 
)
static

returns all edges with are within the specified range of the input edge (either with or without the center itself)

GetEdges_WithinDistance.png
green = input edge , blue = result

◆ WithinDistanceOfCorner()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetEdges.WithinDistanceOfCorner ( Vector3Int  centerCorner,
int  maxDistance 
)
static

returns all edges with are within the specified range of the input corner

GetEdges_WithinDistanceOfCorner.png
green = input corner , blue = result

◆ AtExactDistance()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetEdges.AtExactDistance ( Vector3Int  centeredge,
int  distance 
)
static

returns all the edges with are exactly at the specified distance of the input edge

GetEdges_AtExactDistance.png
green = input corner , blue = result

◆ PathBetweenCorners()

static List<Vector3Int> Wunderwunsch.HexMapLibrary.HexGrid.GetEdges.PathBetweenCorners ( Vector3Int  originCorner,
Vector3Int  targetCorner,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)
static

returns the shortest path of edges from origin to target corner

GetEdges_PathBetweenCorners.png
green = origin corner , purple = target corner, blue = result

◆ TileBorders()

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

returns all the border edges of a set of tiles.

GetEdges_TileBorders.png
green = input tiles , blue = result

◆ BorderPaths()

static List<List<Vector3Int> > Wunderwunsch.HexMapLibrary.HexGrid.GetEdges.BorderPaths ( IEnumerable< Vector3Int >  tiles,
out List< List< EdgeDirection >>  pathDirections 
)
static

returns all the border paths of one contiguous Area. Outer path is clockwise, others are counterclockwise

GetEdges_BorderPaths.png
green = input tiles , blue = result