22 #ifndef FIFE_LOCATION_H 23 #define FIFE_LOCATION_H 76 return !(*
this == loc);
186 #endif //FIFE_LOCATION_H ExactModelCoordinate getExactLayerCoordinates() const
Gets exact layer coordinates set to this location.
void setLayerCoordinates(const ModelCoordinate &coordinates)
Sets "cell precise" layer coordinates to this location.
bool operator==(const Location &loc) const
Compares equality of two locations.
void setExactLayerCoordinates(const ExactModelCoordinate &coordinates)
Sets precise layer coordinates to this location.
Layer * getLayer() const
Gets the layer where this location is pointing to.
ExactModelCoordinate m_exact_layer_coords
void setLayer(Layer *layer)
Sets layer where this location is pointing to.
void setMapCoordinates(const ExactModelCoordinate &coordinates)
Sets map coordinates to this location.
Location()
Default constructor.
bool isValid() const
Tells if location is valid Location is valid if:
void reset()
Resets location (so that layer and coordinate information becomes invalid)
Map * getMap() const
Gets the map where this location is pointing to.
double getLayerDistanceTo(const Location &location) const
Gets layer distance to another location.
double getMapDistanceTo(const Location &location) const
Gets distance in map coordinates to another location on the Map.
std::ostream & operator<<(std::ostream &os, const Location &l)
Stream output operator.
double getCellOffsetDistance() const
Gets offset distance from cell center.
ExactModelCoordinate & getExactLayerCoordinatesRef()
Gets reference to exact layer coordinates.
Location & operator=(const Location &rhs)
Assignment operator.
ExactModelCoordinate getMapCoordinates() const
Gets map coordinates set to this location.
ModelCoordinate getLayerCoordinates() const
Gets cell precision layer coordinates set to this location.
bool operator!=(const Location &loc) const
Compares unequality of two locations.