HexMapLibrary
|
Public Member Functions | |
CoordinateWrapperRectangularHorizontalPeriodic (Vector2Int mapSize) | |
constructor which sets the mapSize; More... | |
override Vector3 | WrapCartesianCoordinate (Vector3 position) |
Returns the closest periodic coordinate of the input cartesian coordinate. More... | |
override Vector3Int | WrapTileCoordinate (Vector3Int position) |
Returns the closest periodic coordinate of the input tile coordinate - Assumes coordinates are not further than 1 map size away from actual map | |
override List< Vector3Int > | WrapTileCoordinates (List< Vector3Int > collection) |
Returns the closest periodic coordinates of a collection of tile coordinates. Assumes coordinates are not further than 1 map size away from actual map More... | |
override Vector3Int | ShiftTargetToClosestPeriodicTilePosition (Vector3Int origin, Vector3Int target) |
This returns the closest "virtual" position of target tile position on a wrapping map, intended to be used in distance calculations TODO ADD BETTER EXPLANATION More... | |
override Vector3Int | ShiftTargetToClosestPeriodicEdgePosition (Vector3Int origin, Vector3Int target) |
TODO ADD DESCRIPTION More... | |
override Vector3Int | ShiftTargetToClosestPeriodicCornerPosition (Vector3Int origin, Vector3Int target) |
TODO ADD DESCRIPTION More... | |
override Vector3Int | WrapEdgeCoordinate (Vector3Int position) |
returns the closest periodic edge position of the input edge position - Assumes coordinates are not further than 1 map size away from actual map More... | |
override List< Vector3Int > | WrapEdgeCoordinates (List< Vector3Int > collection) |
Returns the closest periodic coordinates of a collection of edge coordinates. Assumes coordinates are not further than 1 map size away from actual map More... | |
override Vector3Int | WrapCornerCoordinate (Vector3Int position) |
returns the closest periodic corner position of the input corner position - Assumes coordinates are not further than 1 map size away from actual map More... | |
override List< Vector3Int > | WrapCornerCoordinates (List< Vector3Int > collection) |
Returns the closest periodic coordinates of a collection of corner coordinates. Assumes coordinates are not further than 1 map size away from actual map More... | |
Private Attributes | |
Vector2Int | mapSize |
mapSize in tiles along offset coordinates More... | |
Static Private Attributes | |
static float | sqrt3 = Mathf.Sqrt(3) |
cached value of square root of 3. More... | |
Wunderwunsch.HexMapLibrary.CoordinateWrapperRectangularHorizontalPeriodic.CoordinateWrapperRectangularHorizontalPeriodic | ( | Vector2Int | mapSize | ) |
constructor which sets the mapSize;
|
virtual |
Returns the closest periodic coordinate of the input cartesian coordinate.
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
Returns the closest periodic coordinates of a collection of tile coordinates. Assumes coordinates are not further than 1 map size away from actual map
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
This returns the closest "virtual" position of target tile position on a wrapping map, intended to be used in distance calculations TODO ADD BETTER EXPLANATION
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
TODO ADD DESCRIPTION
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
TODO ADD DESCRIPTION
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
returns the closest periodic edge position of the input edge position - Assumes coordinates are not further than 1 map size away from actual map
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
Returns the closest periodic coordinates of a collection of edge coordinates. Assumes coordinates are not further than 1 map size away from actual map
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
returns the closest periodic corner position of the input corner position - Assumes coordinates are not further than 1 map size away from actual map
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
virtual |
Returns the closest periodic coordinates of a collection of corner coordinates. Assumes coordinates are not further than 1 map size away from actual map
Implements Wunderwunsch.HexMapLibrary.CoordinateWrapper.
|
private |
mapSize in tiles along offset coordinates
|
staticprivate |
cached value of square root of 3.