5 #ifndef MERCATOR_FOREST_H
6 #define MERCATOR_FOREST_H
10 #include <wfmath/axisbox.h>
11 #include <wfmath/polygon.h>
21 class SpeciesParameter;
23 typedef std::map<std::string, SpeciesParameter> ParameterDict;
87 explicit Forest(
unsigned long seed = 0);
Region of terrain surface which is modified.
This is the core class for any area to be populated with vegetation.
std::vector< Species > PlantSpecies
STL vector of plant species in this forest.
PlantSpecies & species()
Accessor for list of species in this forest.
const PlantStore & getPlants() const
Accessor for container of vegetation.
std::map< int, PlantColumn > PlantStore
STL map to store a sparse array of PlantColumn objects.
~Forest()
Destruct a forest.
Area * getArea() const
Accessor for polygonal area.
Forest(unsigned long seed=0)
Construct a new forest with the given seed.
std::map< int, Plant > PlantColumn
STL map to store a sparse array of Plant objects.
void setArea(Area *a)
Assign an area to this forest.
void populate()
This function uses a pseudo-random technique to populate the forest with trees. This algorithm as the...
A set of constraints on a plant parameter.
float range
The range of values a parameter should take.
float min
The minimum value a parameter should take.
Data about a species of plant in a Forest.
ParameterDict m_parameters
Arbitrary parameters.
float m_probability
Probability that this species will occur at each grid node.
float m_deviation
Multiplyer for how deviated from the grid items should be.
A cache of random values.