2015-10-18 15:26:19 +00:00
|
|
|
#ifndef VEGETATIONLAYERDEFINITION_H
|
|
|
|
#define VEGETATIONLAYERDEFINITION_H
|
|
|
|
|
|
|
|
#include "definition_global.h"
|
|
|
|
|
|
|
|
#include "DefinitionNode.h"
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace definition {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Definition of one vegetation layer.
|
|
|
|
*/
|
2015-11-09 21:38:00 +00:00
|
|
|
class DEFINITIONSHARED_EXPORT VegetationLayerDefinition : public DefinitionNode {
|
|
|
|
public:
|
2015-12-13 16:16:26 +00:00
|
|
|
VegetationLayerDefinition(DefinitionNode *parent, const string &name);
|
2015-10-18 15:26:19 +00:00
|
|
|
|
2015-11-09 21:38:00 +00:00
|
|
|
inline const VegetationPresenceDefinition *getPresence() const {
|
|
|
|
return presence;
|
|
|
|
}
|
|
|
|
inline const VegetationModelDefinition *getModel() const {
|
|
|
|
return model;
|
|
|
|
}
|
2015-10-18 15:26:19 +00:00
|
|
|
|
2015-11-02 22:00:02 +00:00
|
|
|
double getMaxHeight() const;
|
|
|
|
|
2015-11-09 21:38:00 +00:00
|
|
|
typedef enum { VEGETATION_BASIC_TREES } VegetationLayerPreset;
|
2015-12-10 18:48:42 +00:00
|
|
|
void applyPreset(VegetationLayerPreset preset, RandomGenerator &random = RandomGeneratorDefault);
|
2015-10-18 15:26:19 +00:00
|
|
|
|
2015-11-09 21:38:00 +00:00
|
|
|
private:
|
2015-10-18 15:26:19 +00:00
|
|
|
/**
|
|
|
|
* Geographic area of presence of this layer.
|
|
|
|
*/
|
2015-10-18 20:15:19 +00:00
|
|
|
VegetationPresenceDefinition *presence;
|
2015-10-18 15:26:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base vegetation model to use for this layer.
|
|
|
|
*/
|
|
|
|
VegetationModelDefinition *model;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // VEGETATIONLAYERDEFINITION_H
|