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

Public Member Functions

 CornersDataProvider (Dictionary< Vector3Int, Corner< C >> cornersByPosition, CornersPositionsProvider cornersPositionsProvider)
 
List< Corner< C > > OfTile (Vector3Int tile)
 returns the 6 corners of the input tile More...
 
List< Corner< C > > OfTile (Tile tile)
 returns the 6 corners of the input tile More...
 
List< Corner< C > > OfEdge (Vector3Int edge)
 returns the 2 corners adjacent to the input edge coordinate More...
 
List< Corner< C > > OfEdge (Edge edge)
 returns the 2 corners adjacent to the input edge More...
 
List< Corner< C > > AdjacentToCorner (Vector3Int corner)
 returns the corners adjacent to the input corner which belong to the map More...
 
List< Corner< C > > AdjacentToCorner (Corner corner)
 returns the 3 corners adjacent to the input corner which belong to the map More...
 
List< Corner< C > > WithinDistance (Vector3Int centerCorner, int maxDistance, bool includeCenter)
 returns all corners within distance of the input corner coordinate - optionally including that corner. More...
 
List< Corner< C > > WithinDistance (Corner< C > centerCorner, int maxDistance, bool includeCenter)
 returns all corners within distance of the input corner - optionally including that corner. More...
 
List< Corner< C > > AtExactDistance (Vector3Int centerCorner, int distance)
 returns all corners at the exact distance of the input corner coordinate. More...
 
List< Corner< C > > AtExactDistance (Corner< C > centerCorner, int distance)
 returns all corners at the exact distance of the input corner. More...
 
List< Corner< C > > PathAlongGrid (Tile< C > originCorner, Tile< C > targetCorner, bool includeOrigin, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns the shortest path of corners from the origin to the target corner - optionally including the origin More...
 
List< Corner< C > > PathAlongGrid (Vector3Int originCorner, Vector3Int targetCorner, bool includeOrigin, float horizontalNudgeFromOriginCenter=NudgePositive)
 returns the shortest path of corners from the origin coordinate to the target corner coordinate - optionally including the origin More...
 
List< Corner< C > > TileBorders (IEnumerable< Vector3Int > tiles)
 returns all the border corners of a set of tiles. More...
 
List< Corner< C > > GetCornersFromCoordinates< Coords > (Coords coordinates)
 returns the corners belonging to the input corner coordinates More...
 

Private Attributes

Dictionary< Vector3Int, Corner< C > > cornersByPosition
 
CornersPositionsProvider cornersPositionsProvider
 

Member Function Documentation

◆ OfTile() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.OfTile ( Vector3Int  tile)

returns the 6 corners of the input tile

Map_GetCorners_OfTile.png
yellow = input tile , blue = result

◆ OfTile() [2/2]

returns the 6 corners of the input tile

◆ OfEdge() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.OfEdge ( Vector3Int  edge)

returns the 2 corners adjacent to the input edge coordinate

Map_GetCorners_AdjacentToEdge.png
green = input edge , blue = result

◆ OfEdge() [2/2]

returns the 2 corners adjacent to the input edge

◆ AdjacentToCorner() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.AdjacentToCorner ( Vector3Int  corner)

returns the corners adjacent to the input corner which belong to the map

Map_GetCorners_AdjacentToCorner_Combined.png
green = input corner , blue = result

◆ AdjacentToCorner() [2/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.AdjacentToCorner ( Corner  corner)

returns the 3 corners adjacent to the input corner which belong to the map

◆ WithinDistance() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.WithinDistance ( Vector3Int  centerCorner,
int  maxDistance,
bool  includeCenter 
)

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

Map_GetCorners_WithinDistance.png
green = input corner , blue = result

◆ WithinDistance() [2/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.WithinDistance ( Corner< C >  centerCorner,
int  maxDistance,
bool  includeCenter 
)

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

◆ AtExactDistance() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.AtExactDistance ( Vector3Int  centerCorner,
int  distance 
)

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

Map_GetCorners_AtExactDistance.png
green = input corner , blue = result

◆ AtExactDistance() [2/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.AtExactDistance ( Corner< C >  centerCorner,
int  distance 
)

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

◆ PathAlongGrid() [1/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.PathAlongGrid ( Tile< C >  originCorner,
Tile< C >  targetCorner,
bool  includeOrigin,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)

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

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

◆ PathAlongGrid() [2/2]

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.PathAlongGrid ( Vector3Int  originCorner,
Vector3Int  targetCorner,
bool  includeOrigin,
float  horizontalNudgeFromOriginCenter = NudgePositive 
)

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

◆ TileBorders()

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.TileBorders ( IEnumerable< Vector3Int >  tiles)

returns all the border corners of a set of tiles.

Map_GetCorners_TileBorders.png
green = input tiles , blue = result

◆ GetCornersFromCoordinates< Coords >()

List<Corner<C> > Wunderwunsch.HexMapLibrary.Generic.CornersDataProvider< C >.GetCornersFromCoordinates< Coords > ( Coords  coordinates)

returns the corners belonging to the input corner coordinates

Type Constraints
Coords :ICollection<Vector3Int>