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

Public Member Functions

 CornerPositionProvider (CoordinateWrapper coordinateWrapper, Dictionary< Vector3Int, int > cornerIndexByPosition)
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate)
 returns the periodic corner coordinate of the input cartesian coordinate More...
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate, out bool cornerIsOnMap)
 returns the periodic corner coordinate of the input cartesian coordinate, the out parameter specifies if that coordinate belongs to the map More...
 

Protected Attributes

readonly CoordinateWrapper coordinateWrapper
 
readonly MapDistanceCalculatorCorners distanceCalculator
 
readonly Dictionary< Vector3Int, int > cornerIndexByPosition
 

Member Function Documentation

◆ FromCartesianCoordinate() [1/2]

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

returns the periodic corner coordinate of the input cartesian coordinate

◆ FromCartesianCoordinate() [2/2]

Vector3Int Wunderwunsch.HexMapLibrary.CornerPositionProvider.FromCartesianCoordinate ( Vector3  cartesianCoordinate,
out bool  cornerIsOnMap 
)

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