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

Public Member Functions

 TilePositionProvider (CoordinateWrapper coordinateWrapper, Dictionary< Vector3Int, int > TileIndexByPosition)
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate)
 returns the periodic tile coordinate of the input cartesian coordinate More...
 
Vector3Int FromCartesianCoordinate (Vector3 cartesianCoordinate, out bool tileIsOnMap)
 returns the periodic tile coordinate of the input cartesian coordinate, the out parameter specifies if that coordinate belongs to the map More...
 
Vector3Int FromTileRotated60DegreeClockwise (Vector3Int center, Vector3Int pointToRotate)
 returns the periodic tile coordinate of the input tile coordinate rotated 60° Clockwise around the specified center tile More...
 
Vector3Int FromTileRotated60DegreeClockwise (Vector3Int center, Vector3Int pointToRotate, out bool tileIsOnMap)
 returns the periodic tile coordinate of the input tile coordinate rotated 60° Clockwise around the specified center tile, the out parameter specifies if that coordinate belongs to the map More...
 
Vector3Int FromTileRotated60DegreeCounterClockwise (Vector3Int center, Vector3Int pointToRotate)
 returns the periodic tile coordinate of the input tile coordinate rotated 60° Counter-clockwise around the specified center tile More...
 
Vector3Int FromTileRotated60DegreeCounterClockwise (Vector3Int center, Vector3Int pointToRotate, out bool tileIsOnMap)
 returns the periodic tile coordinate of the input tile coordinate rotated 60° Counter-clockwise around the specified center tile, the out parameter specifies if that coordinate belongs to the map More...
 
bool IsInputCoordinateOnMap (Vector3Int inputTileCoordinate)
 returns if the input tile coordinate belongs to the map More...
 
bool IsInputCoordinateOnMap (Vector3 inputCartesianCoordinate)
 returns if the input cartesian coordinate belongs to the map More...
 

Protected Attributes

readonly CoordinateWrapper coordinateWrapper
 
readonly Dictionary< Vector3Int, int > tileIndexByPosition
 

Member Function Documentation

◆ FromCartesianCoordinate() [1/2]

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

returns the periodic tile coordinate of the input cartesian coordinate

◆ FromCartesianCoordinate() [2/2]

Vector3Int Wunderwunsch.HexMapLibrary.TilePositionProvider.FromCartesianCoordinate ( Vector3  cartesianCoordinate,
out bool  tileIsOnMap 
)

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

◆ FromTileRotated60DegreeClockwise() [1/2]

Vector3Int Wunderwunsch.HexMapLibrary.TilePositionProvider.FromTileRotated60DegreeClockwise ( Vector3Int  center,
Vector3Int  pointToRotate 
)

returns the periodic tile coordinate of the input tile coordinate rotated 60° Clockwise around the specified center tile

◆ FromTileRotated60DegreeClockwise() [2/2]

Vector3Int Wunderwunsch.HexMapLibrary.TilePositionProvider.FromTileRotated60DegreeClockwise ( Vector3Int  center,
Vector3Int  pointToRotate,
out bool  tileIsOnMap 
)

returns the periodic tile coordinate of the input tile coordinate rotated 60° Clockwise around the specified center tile, the out parameter specifies if that coordinate belongs to the map

◆ FromTileRotated60DegreeCounterClockwise() [1/2]

Vector3Int Wunderwunsch.HexMapLibrary.TilePositionProvider.FromTileRotated60DegreeCounterClockwise ( Vector3Int  center,
Vector3Int  pointToRotate 
)

returns the periodic tile coordinate of the input tile coordinate rotated 60° Counter-clockwise around the specified center tile

◆ FromTileRotated60DegreeCounterClockwise() [2/2]

Vector3Int Wunderwunsch.HexMapLibrary.TilePositionProvider.FromTileRotated60DegreeCounterClockwise ( Vector3Int  center,
Vector3Int  pointToRotate,
out bool  tileIsOnMap 
)

returns the periodic tile coordinate of the input tile coordinate rotated 60° Counter-clockwise around the specified center tile, the out parameter specifies if that coordinate belongs to the map

◆ IsInputCoordinateOnMap() [1/2]

bool Wunderwunsch.HexMapLibrary.TilePositionProvider.IsInputCoordinateOnMap ( Vector3Int  inputTileCoordinate)

returns if the input tile coordinate belongs to the map

◆ IsInputCoordinateOnMap() [2/2]

bool Wunderwunsch.HexMapLibrary.TilePositionProvider.IsInputCoordinateOnMap ( Vector3  inputCartesianCoordinate)

returns if the input cartesian coordinate belongs to the map