-
Notifications
You must be signed in to change notification settings - Fork 2
/
WFS_landscape.h
84 lines (70 loc) · 2.06 KB
/
WFS_landscape.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef WILDLAND_FIRESIM_LANDSCAPE_H
#define WILDLAND_FIRESIM_LANDSCAPE_H
#include <cstdlib>
#include <cmath>
#include <iostream>
#include "csvreader.h"
#include "globals.h"
#include "utility.h"
#include "cell.h"
#include "landscape_interface.h"
namespace wildland_firesim {
/*!
* \brief The WFS_Landscape class
* is derived from the landscape_interface class. It contains all relevant landscape information for the fire
* spread simulation.
*/
class WFS_Landscape : public LandscapeInterface
{
public:
WFS_Landscape();
/*!
* \brief generateLandscapeFromFile
* to generates a landscape from a parameter file specified by the committed file name.
* Grass-dominated vegetation is used as the default vegetation type. If such is specified,
* rectangular, non-flammable vegetation clusters are placed within the landscape.
* \param fileName
*/
void generateLandscapeFromFile(const std::string &fileName);
/*!
* \brief importLandscapeFromFile
* imports landscape from three ASCII grid files. The files have to be named "GroundCover.asc",
* "liveBiomass.asc" and "deadBiomass.asc" in respect to their content.
*/
void importLandscapeFromFile();
/*!
* \brief getWidth
* returns the width of the landscape.
* \return
*/
int getWidth() const noexcept override;
/*!
* \brief getHeight
* returns the height in cells of the landscape.
* \return
*/
int getHeight() const noexcept override;
/*!
* \brief getCellInformation
* returns properties of a grid cell at the specified coordinates.
* \param x
* \param y
* \return
*/
Cell *getCellInformation(int x, int y) override;
/*!
* \brief getCellSize
* returns the cell size.
* \return
*/
int getCellSize() const noexcept override;
private:
std::vector<Cell> cellInformation;
//Landscape dimensions
int m_width;
int m_height;
int m_cellSize;
std::size_t datasize;
};
} // namespace wildland_firesim
#endif // WILDLAND_FIRESIM_LANDSCAPE_H