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