HexMapLibrary
|
Public Member Functions | |
CornersPositionsProvider (CoordinateWrapper coordinateWrapper, Dictionary< Vector3Int, int > CornerIndexByPosition) | |
List< Vector3Int > | OfTile (Vector3Int tile) |
returns the 6 corners of the input tile More... | |
List< Vector3Int > | OfEdge (Vector3Int edge) |
returns the 2 corners adjacent to the input edge More... | |
List< Vector3Int > | AdjacentToCorner (Vector3Int corner) |
returns the 3 corners adjacent to the input corner which belong to the map More... | |
List< Vector3Int > | WithinDistance (Vector3Int centerCorner, int maxDistance, bool includeSelf) |
returns all corners within distance of the input corner - optionally including that corner. More... | |
List< Vector3Int > | AtExactDistance (Vector3Int centerCorner, int distance) |
returns all corners at the exact distance of the input corner. More... | |
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... | |
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... | |
Protected Member Functions | |
List< Vector3Int > | GetValidCornerCoordinates (List< Vector3Int > rawPositions) |
Wraps the input corner positions (if the map is periodic) and removes all those which are still out of the map bounds after that More... | |
Protected Attributes | |
readonly CoordinateWrapper | coordinateWrapper |
readonly Dictionary< Vector3Int, int > | CornerIndexByPosition |
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.OfTile | ( | Vector3Int | tile | ) |
returns the 6 corners of the input tile
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.OfEdge | ( | Vector3Int | edge | ) |
returns the 2 corners adjacent to the input edge
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.AdjacentToCorner | ( | Vector3Int | corner | ) |
returns the 3 corners adjacent to the input corner which belong to the map
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.WithinDistance | ( | Vector3Int | centerCorner, |
int | maxDistance, | ||
bool | includeSelf | ||
) |
returns all corners within distance of the input corner - optionally including that corner.
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.AtExactDistance | ( | Vector3Int | centerCorner, |
int | distance | ||
) |
returns all corners at the exact distance of the input corner.
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.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
List<Vector3Int> Wunderwunsch.HexMapLibrary.CornersPositionsProvider.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.
|
protected |
Wraps the input corner positions (if the map is periodic) and removes all those which are still out of the map bounds after that