30#ifndef DOXYGEN_SHOULD_SKIP_THIS
323#ifndef DOXYGEN_SHOULD_SKIP_THIS
328 static constexpr bool value =
true;
A two-dimensional array.
Definition: Array2D.h:304
A square map.
Definition: Map.h:108
void setCell(Vector2i pos, Flags< CellProperty > flags)
Set the properties of a cell.
void setEmpty(Vector2i pos)
Make a cell empty.
Vector2i getSize() const
Get the size of the map.
bool isInFieldOfVision(Vector2i pos) const
Check if a cell is visible.
void clearFieldOfVision()
Make the whole map not visible.
void reset(Flags< CellProperty > flags)
Initialize the cells with some properties.
bool isWalkable(Vector2i pos) const
Check if a cell is walkable.
PositionRange< int > getRange() const
Get a range of the positions of the map.
void setTransparent(Vector2i pos, bool transparent=true)
Make a cell transparent.
SquareMap(Vector2i size)
Constructor.
void computeFieldOfVision(Vector2i pos, int maxRadius=0, FieldOfVisionLimit limit=FieldOfVisionLimit::Included, FieldOfVision algorithm=FieldOfVision::Basic)
Compute a field of vision.
bool isTransparent(Vector2i pos) const
Check if a cell is transparent.
std::vector< Vector2i > computeRoute(Vector2i origin, Vector2i target, float diagonalCost=Sqrt2, Route algorithm=Route::AStar)
Compute a route between two points.
void clearExplored()
Make the whole map not explored.
void computeLocalFieldOfVision(Vector2i pos, int maxRadius=0, FieldOfVisionLimit limit=FieldOfVisionLimit::Included, FieldOfVision algorithm=FieldOfVision::Basic)
Compute a local field of vision.
void setWalkable(Vector2i pos, bool walkable=true)
Make a cell walkable.
bool isExplored(Vector2i pos) const
Check if a cell is explored.
constexpr float Sqrt2
The constant.
Definition: Math.h:76
FieldOfVision
Algorithm for computing a field of vision.
Definition: Map.h:63
Route
Algorithm for computing a route.
Definition: Map.h:86
constexpr Flags< CellProperty > EmptyCell
An empty cell.
Definition: Map.h:55
CellProperty
A property of a cell.
Definition: Map.h:40
FieldOfVisionLimit
Constant to indicate if the limit is part of the field of vision.
Definition: Map.h:75
@ Basic
A basic algorithm based on ray casting.
@ Dijkstra
The Dijkstra algorithm.
@ Transparent
The cell is transparent.
@ Walkable
The cell is walkable.
@ Explored
The cell has been explored (computed by FoV)
@ Visible
The cell is visible (computed by FoV)
@ Excluded
The limits are not included in the field of vision.
@ Included
The limits are included in the field of vision.
The namespace for gf classes.
A 2D range.
Definition: Range.h:278