5 #ifndef MERCATOR_FOREST_H 6 #define MERCATOR_FOREST_H 8 #include <Mercator/RandCache.h> 10 #include <wfmath/axisbox.h> 11 #include <wfmath/polygon.h> 20 class SpeciesParameter;
22 typedef std::map<std::string, SpeciesParameter> ParameterDict;
85 explicit Forest(
unsigned long seed = 0);
104 void setArea(
Area* a);
111 #endif // MERCATOR_FOREST_H A cache of random values.
Definition: RandCache.h:17
PlantStore m_plants
2D spatial container with all the vegetation instances in.
Definition: Forest.h:78
RandCache m_randCache
Cache for optimising random number generation.
Definition: Forest.h:82
Area * getArea() const
Accessor for polygonal area.
Definition: Forest.h:89
PlantSpecies & species()
Accessor for list of species in this forest.
Definition: Forest.h:94
float range
The range of values a parameter should take.
Definition: Forest.h:30
unsigned long m_seed
Seed value used to initialise the random number generator.
Definition: Forest.h:80
Data about a species of plant in a Forest.
Definition: Forest.h:38
ParameterDict m_parameters
Arbitrary parameters.
Definition: Forest.h:47
float m_deviation
Multiplyer for how deviated from the grid items should be.
Definition: Forest.h:44
A set of constraints on a plant parameter.
Definition: Forest.h:25
std::map< int, PlantColumn > PlantStore
STL map to store a sparse array of PlantColumn objects.
Definition: Forest.h:67
PlantSpecies m_species
List of species in this forest.
Definition: Forest.h:76
float m_probability
Probability that this species will occur at each grid node.
Definition: Forest.h:41
std::vector< Species > PlantSpecies
STL vector of plant species in this forest.
Definition: Forest.h:70
This is the core class for any area to be populated with vegetation.
Definition: Forest.h:56
const PlantStore & getPlants() const
Accessor for container of vegetation.
Definition: Forest.h:100
float min
The minimum value a parameter should take.
Definition: Forest.h:28
Region of terrain surface which is modified.
Definition: Area.h:28
std::map< int, Plant > PlantColumn
STL map to store a sparse array of Plant objects.
Definition: Forest.h:61
Area * m_area
Area of terrain affected by the presence of this forest.
Definition: Forest.h:73