Rev 824 | Rev 1002 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 824 | Rev 863 | ||
---|---|---|---|
Line 100... | Line 100... | ||
100 | // sapling growth: the height map is per resource unit and holds the maximum height of saplings for each LIF-pixel and all species
|
100 | // sapling growth: the height map is per resource unit and holds the maximum height of saplings for each LIF-pixel and all species
|
101 | // the map itself is a local variable and only filled temporarily.
|
101 | // the map itself is a local variable and only filled temporarily.
|
102 | void setSaplingHeightMap(float *map_pointer); ///< set (temporal) storage for sapling-height-map |
102 | void setSaplingHeightMap(float *map_pointer); ///< set (temporal) storage for sapling-height-map |
103 | /// returns maximum sapling height at point given by point-index (LIF-index).
|
103 | /// returns maximum sapling height at point given by point-index (LIF-index).
|
104 | /// you must call setSaplingHeightMap() with a valid map before.
|
104 | /// you must call setSaplingHeightMap() with a valid map before.
|
105 | float saplingHeightAt(const QPoint &position) const { Q_ASSERT(mSaplingHeightMap); int pixel_index = cPxPerRU*(position.x()-mCornerCoord.x())+(position.y()-mCornerCoord.y()); return mSaplingHeightMap[pixel_index];} |
- | |
- | 105 | float saplingHeightAt(const QPoint &position) const { |
|
- | 106 | Q_ASSERT(mSaplingHeightMap); |
|
- | 107 | int pixel_index = cPxPerRU*(position.x()-mCornerCoord.x())+(position.y()-mCornerCoord.y()); |
|
- | 108 | float h = mSaplingHeightMap[pixel_index]; |
|
- | 109 | return h; |
|
- | 110 | }
|
|
106 | /// return maximum sapling height at point 'position' (LIF-index). This call is slower but works witout a prior call
|
111 | /// return maximum sapling height at point 'position' (LIF-index). This call is slower but works witout a prior call
|
107 | /// to setSaplingHeightMap().
|
112 | /// to setSaplingHeightMap().
|
108 | float saplingHeightForInit(const QPoint &position) const; |
113 | float saplingHeightForInit(const QPoint &position) const; |
109 | /// set the height of the sapling map to the maximum of current value and 'height'.
|
114 | /// set the height of the sapling map to the maximum of current value and 'height'.
|
110 | void setMaxSaplingHeightAt(const QPoint &position, const float height); |
115 | void setMaxSaplingHeightAt(const QPoint &position, const float height); |
Line 154... | Line 159... | ||
154 | StandStatistics mStatistics; ///< aggregate values on stand value |
159 | StandStatistics mStatistics; ///< aggregate values on stand value |
155 | ResourceUnitVariables mUnitVariables;
|
160 | ResourceUnitVariables mUnitVariables;
|
156 | 161 | ||
157 | friend class RUWrapper; |
162 | friend class RUWrapper; |
158 | }; |
163 | }; |
- | 164 | ||
159 | 165 | ||
160 | #endif // RESOURCEUNIT_H
|
166 | #endif // RESOURCEUNIT_H
|