HexMapLibrary
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E > Class Template Reference

Public Member Functions

 EdgesDataProvider (Dictionary< Vector3Int, Edge< E >> edgesByPosition, EdgePositionsProvider edgesPositionsProvider)
 
List< Edge< E > > AdjacentToEdge (Vector3Int edge)
 returns all edges adjacent to the input edge coordinate which belong to the map More...
 
List< Edge< E > > AdjacentToEdge (Edge edge)
 returns all edges adjacent to the input edge which belong to the map More...
 
List< Edge< E > > AdjacentToCorner (Vector3Int corner)
 returns all edges adjacent to the input corner coordinate which belong to the map More...
 
List< Edge< E > > AdjacentToCorner (Corner corner)
 returns all edges adjacent to the input corner which belong to the map More...
 
List< Edge< E > > OfTile (Vector3Int tile)
 returns all edges of the input tile coordinate More...
 
List< Edge< E > > OfTile (Tile tile)
 returns all edges of the input tile More...
 
List< Edge< E > > WithinDistanceOfEdge (Vector3Int centerEdge, int maxDistance, bool includeSelf)
 returns all edges within range of the input edge coordinate which belong to the map More...
 
List< Edge< E > > WithinDistanceOfEdge (Edge centerEdge, int maxDistance, bool includeSelf)
 returns all edges within range of the input edge which belong to the map More...
 
List< Edge< E > > WithinDistanceOfCorner (Vector3Int centerCorner, int maxDistance)
 returns all edges within range of the input corner coordinate which belong to the map More...
 
List< Edge< E > > WithinDistanceOfCorner (Corner centerCorner, int maxDistance)
 returns all edges within range of the input corner which belong to the map More...
 
List< Edge< E > > AtExactDistance (Vector3Int centerEdge, int distance)
 returns all edges at the exact distance of the input edge coordinate which belong to the map More...
 
List< Edge< E > > PathBetweenCorners (Vector3Int originCorner, Vector3Int targetCorner, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns the shortest path of edges from origin to target corner More...
 
List< Edge< E > > TileBorders (IEnumerable< Vector3Int > tiles)
 returns all the border edges of a set of tiles. More...
 
List< Edge< E > > TileBorders (IEnumerable< Tile > tiles)
 returns all the border edges of a set of tiles. More...
 

Private Member Functions

List< Edge< E > > GetEdgesFromCoordinates< Coords > (Coords coordinates)
 returns the edges belonging to the input edge coordinates More...
 

Private Attributes

Dictionary< Vector3Int, Edge< E > > edgesByPosition
 
EdgePositionsProvider edgesPositionsProvider
 

Member Function Documentation

◆ AdjacentToEdge() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.AdjacentToEdge ( Vector3Int  edge)

returns all edges adjacent to the input edge coordinate which belong to the map

Map_GetEdges_AdjacentToEdge_Combined.png
green = input edge , blue = result

◆ AdjacentToEdge() [2/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.AdjacentToEdge ( Edge  edge)

returns all edges adjacent to the input edge which belong to the map

◆ AdjacentToCorner() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.AdjacentToCorner ( Vector3Int  corner)

returns all edges adjacent to the input corner coordinate which belong to the map

Map_GetEdges_AdjacentToCorner_Combined.png
green = input corner , blue = result

◆ AdjacentToCorner() [2/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.AdjacentToCorner ( Corner  corner)

returns all edges adjacent to the input corner which belong to the map

◆ OfTile() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.OfTile ( Vector3Int  tile)

returns all edges of the input tile coordinate

GetEdges_OfTile.png
yellow = input tile , blue = result

◆ OfTile() [2/2]

returns all edges of the input tile

◆ WithinDistanceOfEdge() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.WithinDistanceOfEdge ( Vector3Int  centerEdge,
int  maxDistance,
bool  includeSelf 
)

returns all edges within range of the input edge coordinate which belong to the map

Map_GetEdges_WithinDistanceOfEdge_Combined.png
green = input edge, blue = result

◆ WithinDistanceOfEdge() [2/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.WithinDistanceOfEdge ( Edge  centerEdge,
int  maxDistance,
bool  includeSelf 
)

returns all edges within range of the input edge which belong to the map

◆ WithinDistanceOfCorner() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.WithinDistanceOfCorner ( Vector3Int  centerCorner,
int  maxDistance 
)

returns all edges within range of the input corner coordinate which belong to the map

Map_GetEdges_WithinDistanceOfCorner_Combined.png
green = input corner , blue = result

◆ WithinDistanceOfCorner() [2/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.WithinDistanceOfCorner ( Corner  centerCorner,
int  maxDistance 
)

returns all edges within range of the input corner which belong to the map

◆ AtExactDistance()

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.AtExactDistance ( Vector3Int  centerEdge,
int  distance 
)

returns all edges at the exact distance of the input edge coordinate which belong to the map

Map_GetEdges_AtExactDistance_Combined.png
green = input corner , blue = result

◆ PathBetweenCorners()

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.PathBetweenCorners ( Vector3Int  originCorner,
Vector3Int  targetCorner,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)

returns the shortest path of edges from origin to target corner

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

◆ TileBorders() [1/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.TileBorders ( IEnumerable< Vector3Int >  tiles)

returns all the border edges of a set of tiles.

Map_GetEdges_TileBorders.png
green = input tiles , blue = result

◆ TileBorders() [2/2]

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.TileBorders ( IEnumerable< Tile tiles)

returns all the border edges of a set of tiles.

◆ GetEdgesFromCoordinates< Coords >()

List<Edge<E> > Wunderwunsch.HexMapLibrary.Generic.EdgesDataProvider< E >.GetEdgesFromCoordinates< Coords > ( Coords  coordinates)
private

returns the edges belonging to the input edge coordinates

Type Constraints
Coords :ICollection<Vector3Int>