30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 63 constexpr CellFlags
EmptyCell = combineFlags(CellProperty::Transparent, CellProperty::Walkable);
159 void setCell(Vector2i pos, CellFlags flags);
166 void clear(CellFlags flags);
326 Array2D<CellFlags,
int> m_cells;
329 #ifndef DOXYGEN_SHOULD_SKIP_THIS 334 static constexpr bool value =
true;
void setWalkable(Vector2i pos)
Make a cell walkable.
A two-dimensional array.
Definition: Array2D.h:63
void clearExplored()
Make the whole map not explored.
void setTransparent(Vector2i pos)
Make a cell transparent.
Route
Algorithm for computing a route.
Definition: Map.h:94
void clearFieldOfVision()
Make the whole map not visible.
void computeFieldOfVision(Vector2i pos, int maxRadius=0, FieldOfVisionLimit limit=FieldOfVisionLimit::Included, FieldOfVision algorithm=FieldOfVision::Basic)
Compute a field of vision.
Bitfield relying on an enumeration.
Definition: Flags.h:68
PositionRange< int > getRange() const
Get a range of the positions of the map.
The limits are included in the field of vision.
void setEmpty(Vector2i pos)
Make a cell empty.
CellProperty
A property of a cell.
Definition: Map.h:40
bool isExplored(Vector2i pos) const
Check if a cell is explored.
The cell is visible (computed by FoV)
bool isInFieldOfVision(Vector2i pos) const
Check if a cell is visible.
A basic algorithm based on ray casting.
void clear(CellFlags flags)
Initialize the cells with some properties.
FieldOfVisionLimit
Constant to indicate if the limit is part of the field of vision.
Definition: Map.h:83
The namespace for gf classes.
Definition: Action.h:34
void setCell(Vector2i pos, CellFlags flags)
Set the properties of a cell.
FieldOfVision
Algorithm for computing a field of vision.
Definition: Map.h:71
std::vector< Vector2i > computeRoute(Vector2i origin, Vector2i target, float diagonalCost=Sqrt2, Route algorithm=Route::AStar)
Compute a route between two points.
Vector2i getSize() const
Get the size of the map.
A square map.
Definition: Map.h:116
bool isWalkable(Vector2i pos) const
Check if a cell is walkable.
SquareMap(Vector2i size)
Constructor.
bool isTransparent(Vector2i pos) const
Check if a cell is transparent.
A 2D range.
Definition: Range.h:225
void computeLocalFieldOfVision(Vector2i pos, int maxRadius=0, FieldOfVisionLimit limit=FieldOfVisionLimit::Included, FieldOfVision algorithm=FieldOfVision::Basic)
Compute a local field of vision.
The cell has been explored (computed by FoV)
#define GF_API
Definition: Portability.h:35
The limits are not included in the field of vision.
constexpr CellFlags EmptyCell
An empty cell.
Definition: Map.h:63