22 #ifndef FIFE_MODEL_GRIDS_HEXGRID_H 23 #define FIFE_MODEL_GRIDS_HEXGRID_H 44 const std::string&
getType()
const;
45 const std::string&
getName()
const;
const std::string & getType() const
Type of cellgrid.
double getXZigzagOffset(double y)
double getAdjacentCost(const ModelCoordinate &curpos, const ModelCoordinate &target)
Returns distance const from curpos to target point only cells adjacent to curpos are considered in th...
ExactModelCoordinate toExactLayerCoordinates(const ExactModelCoordinate &map_coord)
Transforms given point from map coordinates to layer coordinates.
std::vector< ModelCoordinate > toMultiCoordinates(const ModelCoordinate &position, const std::vector< ModelCoordinate > &orig, bool reverse)
Returns point vector with coordinates for a multi object.
std::vector< ModelCoordinate > getCoordinatesInLine(const ModelCoordinate &start, const ModelCoordinate &end)
Returns point vector with coordinates for a line from start to end.
HexGrid(bool axial=false)
ExactModelCoordinate toMapCoordinates(const ExactModelCoordinate &layer_coords)
Transforms given point from layer coordinates to map coordinates.
const std::string & getName() const
Name of the cellgrid (DEPRECATED? -jwt)
CellGrid * clone()
Returns clone of this cellgrid.
double getHeuristicCost(const ModelCoordinate &curpos, const ModelCoordinate &target)
Returns distance const from curpos to target point.
ModelCoordinate toLayerCoordinatesFromExactLayerCoordinates(const ExactModelCoordinate &exact_layer_coords)
Transforms given point from exact layer coordinates to cell precision layer coordinates.
void getVertices(std::vector< ExactModelCoordinate > &vtx, const ModelCoordinate &cell)
Fills given point vector with vertices from selected cell.
ModelCoordinate toLayerCoordinates(const ExactModelCoordinate &map_coord)
Transforms given point from map coordinates to layer coordinates.
bool isAccessible(const ModelCoordinate &curpos, const ModelCoordinate &target)
Tells if given target point is accessible from curpos only cells adjacent to curpos are considered in...
ModelCoordinate toLayerCoordinatesHelper(const ExactModelCoordinate &coords)
uint32_t getCellSideCount() const
Gets the count of sides for a single cell.