HexMapLibrary
Public Member Functions | Protected Attributes | List of all members
Wunderwunsch.HexMapLibrary.EdgePositionProvider Class Reference

Public Member Functions

 EdgePositionProvider (CoordinateWrapper coordinateWrapper, Dictionary< Vector3Int, int > EdgeIndexByPosition)
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate)
 returns the periodic edge coordinate of the input cartesian coordinate More...
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate, out bool edgeIsOnMap)
 returns the periodic edge coordinate of the input cartesian coordinate, the out parameter specifies if that coordinate belongs to the map More...
 
Vector3Int BetweenNeighbouringCorners (Vector3Int cornerA, Vector3Int cornerB)
 returns the edge coordinate between the input corners More...
 
Vector3Int BetweenNeighbouringTiles (Vector3Int tileA, Vector3Int tileB)
 returns the edge coordinate between the input tiles More...
 

Protected Attributes

readonly MapDistanceCalculatorTile GetTileDistance
 
readonly MapDistanceCalculatorCorners GetCornerDistance
 
readonly CoordinateWrapper coordinateWrapper
 
readonly Dictionary< Vector3Int, int > edgeIndexByPosition
 

Member Function Documentation

◆ FromCartesianCoordinate() [1/2]

Vector3Int Wunderwunsch.HexMapLibrary.EdgePositionProvider.FromCartesianCoordinate ( Vector3  cartesianCoordinate)

returns the periodic edge coordinate of the input cartesian coordinate

◆ FromCartesianCoordinate() [2/2]

Vector3Int Wunderwunsch.HexMapLibrary.EdgePositionProvider.FromCartesianCoordinate ( Vector3  cartesianCoordinate,
out bool  edgeIsOnMap 
)

returns the periodic edge coordinate of the input cartesian coordinate, the out parameter specifies if that coordinate belongs to the map

◆ BetweenNeighbouringCorners()

Vector3Int Wunderwunsch.HexMapLibrary.EdgePositionProvider.BetweenNeighbouringCorners ( Vector3Int  cornerA,
Vector3Int  cornerB 
)

returns the edge coordinate between the input corners

◆ BetweenNeighbouringTiles()

Vector3Int Wunderwunsch.HexMapLibrary.EdgePositionProvider.BetweenNeighbouringTiles ( Vector3Int  tileA,
Vector3Int  tileB 
)

returns the edge coordinate between the input tiles