HexMapLibrary
|
Public Member Functions | |
TilePositionsProvider (CoordinateWrapper coordinateWrapper, Dictionary< Vector3Int, int > TileIndexByPosition) | |
List< Vector3Int > | AdjcacentToCorner (Vector3Int corner) |
returns the map tiles adjacent to the input corner More... | |
List< Vector3Int > | AdjacentToEdge (Vector3Int edge) |
returns the map tiles adjacent to the input edge More... | |
List< Vector3Int > | AdjacentToTile (Vector3Int center) |
returns the map tiles directly neigbouring the input tile More... | |
List< Vector3Int > | Cone (Vector3Int origin, Vector3Int targetDirection, float coneHalfAngle, int coneLength) |
returns all map tiles of a cone starting at a point with given direction, length and width More... | |
List< Vector3Int > | Ring (Vector3Int center, int radius, int thicknessInwards) |
returns all map tiles of a ring around center in no defined order More... | |
List< Vector3Int > | Ring (Vector3Int center, int radius, TileDirection startDirection, bool clockwise) |
returns all map tiles of a ring around center in order specified by parameters (startDirection, clockwise) More... | |
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... | |
List< Vector3Int > | Disc (Vector3Int center, int range, bool includeCenter) |
Returns all tiles of the map which are within distance of the center point, either with or without the center point More... | |
List< List< Vector3Int > > | ContiguousAreasOfInputTiles (ICollection< Vector3Int > inputTiles) |
splits the input collection into separated Lists for each contiguous area formed by the input tile coordinates. More... | |
Protected Member Functions | |
List< Vector3Int > | GetValidTileCoordinates (List< Vector3Int > rawPositions) |
Returns the subset of coordinates of the input which are a valid part of the map, accounting for map wrap around. More... | |
Protected Attributes | |
readonly CoordinateWrapper | coordinateWrapper |
readonly Dictionary< Vector3Int, int > | TileIndexByPosition |
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.AdjcacentToCorner | ( | Vector3Int | corner | ) |
returns the map tiles adjacent to the input corner
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.AdjacentToEdge | ( | Vector3Int | edge | ) |
returns the map tiles adjacent to the input edge
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.AdjacentToTile | ( | Vector3Int | center | ) |
returns the map tiles directly neigbouring the input tile
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.Cone | ( | Vector3Int | origin, |
Vector3Int | targetDirection, | ||
float | coneHalfAngle, | ||
int | coneLength | ||
) |
returns all map tiles of a cone starting at a point with given direction, length and width
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.Ring | ( | Vector3Int | center, |
int | radius, | ||
int | thicknessInwards | ||
) |
returns all map tiles of a ring around center in no defined order
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.Ring | ( | Vector3Int | center, |
int | radius, | ||
TileDirection | startDirection, | ||
bool | clockwise | ||
) |
returns all map tiles of a ring around center in order specified by parameters (startDirection, clockwise)
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.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
List<Vector3Int> Wunderwunsch.HexMapLibrary.TilePositionsProvider.Disc | ( | Vector3Int | center, |
int | range, | ||
bool | includeCenter | ||
) |
Returns all tiles of the map which are within distance of the center point, either with or without the center point
List<List<Vector3Int> > Wunderwunsch.HexMapLibrary.TilePositionsProvider.ContiguousAreasOfInputTiles | ( | ICollection< Vector3Int > | inputTiles | ) |
splits the input collection into separated Lists for each contiguous area formed by the input tile coordinates.
|
protected |
Returns the subset of coordinates of the input which are a valid part of the map, accounting for map wrap around.