Rev 251 | Rev 269 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 251 | Rev 255 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | class ResourceUnit
|
13 | class ResourceUnit
|
14 | {
|
14 | {
|
15 | public: |
15 | public: |
16 | ResourceUnit(const int index); |
16 | ResourceUnit(const int index); |
17 | ~ResourceUnit(); |
17 | ~ResourceUnit(); |
- | 18 | ||
18 | // access to elements
|
19 | // access to elements
|
19 | int index() const { return mIndex; } |
- | |
20 | Climate *climate() const { return mClimate; } ///< link to the climate on this resource unit |
- | |
- | 20 | const Climate *climate() const { return mClimate; } ///< link to the climate on this resource unit |
|
- | 21 | const WaterCycle *waterCycle() const { return mWater; } ///< water model of the unit |
|
21 | SpeciesSet *speciesSet() const { return mSpeciesSet; } ///< get SpeciesSet this RU links to. |
22 | SpeciesSet *speciesSet() const { return mSpeciesSet; } ///< get SpeciesSet this RU links to. |
22 | /// get RU-Species-container of @p species from the RU
|
- | |
23 | ResourceUnitSpecies &resourceUnitSpecies(const Species *species); |
- | |
- | 23 | ResourceUnitSpecies &resourceUnitSpecies(const Species *species); ///< get RU-Species-container of @p species from the RU |
|
24 | const QVector<ResourceUnitSpecies> ruSpecies() const { return mRUSpecies; } |
24 | const QVector<ResourceUnitSpecies> ruSpecies() const { return mRUSpecies; } |
25 | const QRectF &boundingBox() const { return mBoundingBox; } |
- | |
26 | QVector<Tree> &trees() { return mTrees; } ///< reference to the tree list. |
25 | QVector<Tree> &trees() { return mTrees; } ///< reference to the tree list. |
27 | const QVector<Tree> &constTrees() const { return mTrees; } ///< reference to the tree list. |
26 | const QVector<Tree> &constTrees() const { return mTrees; } ///< reference to the tree list. |
- | 27 | ||
28 | // properties
|
28 | // properties
|
- | 29 | int index() const { return mIndex; } |
|
- | 30 | const QRectF &boundingBox() const { return mBoundingBox; } |
|
29 | double area() const { return mPixelCount*100; } ///< get the resuorce unit area in m2 |
31 | double area() const { return mPixelCount*100; } ///< get the resuorce unit area in m2 |
30 | double stockedArea() const { return mStockedArea; } ///< get the stocked area in m2 |
32 | double stockedArea() const { return mStockedArea; } ///< get the stocked area in m2 |
- | 33 | ||
31 | // actions
|
34 | // actions
|
32 | /// returns a modifiable reference to a free space inside the tree-vector. should be used for tree-init.
|
35 | /// returns a modifiable reference to a free space inside the tree-vector. should be used for tree-init.
|
33 | Tree &newTree(); |
36 | Tree &newTree(); |
34 | /// addWLA() is called by each tree to aggregate the total weighted leaf area on a unit
|
37 | /// addWLA() is called by each tree to aggregate the total weighted leaf area on a unit
|
35 | void addWLA(const float LA, const float LRI) { mAggregatedWLA += LA*LRI; mAggregatedLA += LA; } |
38 | void addWLA(const float LA, const float LRI) { mAggregatedWLA += LA*LRI; mAggregatedLA += LA; } |