Rev 144 | Rev 148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 144 | Rev 145 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | // lifecycle
|
15 | // lifecycle
|
16 | Tree(); |
16 | Tree(); |
17 | void setup(); |
17 | void setup(); |
18 | 18 | ||
19 | // access to properties
|
19 | // access to properties
|
20 | const int id() const { return mId; } |
- | |
- | 20 | int id() const { return mId; } |
|
21 | void setNewId() { mId = m_nextId++; } |
21 | void setNewId() { mId = m_nextId++; } |
22 | void setPosition(const QPointF pos) { mPosition=pos; } |
22 | void setPosition(const QPointF pos) { mPosition=pos; } |
23 | const QPointF position() const { return mPosition; } |
23 | const QPointF position() const { return mPosition; } |
24 | void setDbh(const float dbh) { mDbh=dbh; } |
24 | void setDbh(const float dbh) { mDbh=dbh; } |
25 | const float dbh() const { return mDbh; } |
- | |
- | 25 | float dbh() const { return mDbh; } |
|
26 | void setHeight(const float height) { mHeight=height; } |
26 | void setHeight(const float height) { mHeight=height; } |
27 | const float height() const { return mHeight; } |
- | |
28 | const float lightRessourceIndex() const { return mLRI; } |
- | |
- | 27 | float height() const { return mHeight; } |
|
- | 28 | float lightRessourceIndex() const { return mLRI; } |
|
29 | const Species* species() const { Q_ASSERT(mRU!=0); return mSpecies; } |
29 | const Species* species() const { Q_ASSERT(mRU!=0); return mSpecies; } |
30 | void setSpecies(Species *ts) { mSpecies=ts; } |
30 | void setSpecies(Species *ts) { mSpecies=ts; } |
31 | const RessourceUnit *ru() const { Q_ASSERT(mRU!=0); return mRU; } |
31 | const RessourceUnit *ru() const { Q_ASSERT(mRU!=0); return mRU; } |
32 | void setRU(RessourceUnit *ru) { mRU = ru; } |
32 | void setRU(RessourceUnit *ru) { mRU = ru; } |
33 | const double volume() const; ///< volume (m3) of stem volume based on geometry and density calculated on the fly. |
- | |
- | 33 | double volume() const; ///< volume (m3) of stem volume based on geometry and density calculated on the fly. |
|
34 | 34 | ||
35 | // actions
|
35 | // actions
|
36 | void enableDebugging(const bool enable=true) { mDebugging = enable; } |
36 | void enableDebugging(const bool enable=true) { mDebugging = enable; } |
37 | // grid based light-concurrency functions
|
37 | // grid based light-concurrency functions
|
38 | void applyStamp(); ///< apply LightInfluencePattern onto the global grid |
38 | void applyStamp(); ///< apply LightInfluencePattern onto the global grid |
Line 47... | Line 47... | ||
47 | 47 | ||
48 | // static functions
|
48 | // static functions
|
49 | static void setGrid(FloatGrid* gridToStamp, FloatGrid *dominanceGrid) { mGrid = gridToStamp; mHeightGrid = dominanceGrid; } |
49 | static void setGrid(FloatGrid* gridToStamp, FloatGrid *dominanceGrid) { mGrid = gridToStamp; mHeightGrid = dominanceGrid; } |
50 | // statistics
|
50 | // statistics
|
51 | static void resetStatistics(); |
51 | static void resetStatistics(); |
52 | static const int statPrints() { return m_statPrint; } |
- | |
53 | static const int statCreated() { return m_statCreated; } |
- | |
- | 52 | static int statPrints() { return m_statPrint; } |
|
- | 53 | static int statCreated() { return m_statCreated; } |
|
54 | 54 | ||
55 | static float lafactor; |
55 | static float lafactor; |
56 | 56 | ||
57 | QString dump(); |
57 | QString dump(); |
58 | void dumpList(DebugList &rTargetList); |
- | |
- | 58 | void dumpList(QList<QVariant> &rTargetList); |
|
59 | 59 | ||
60 | private: |
60 | private: |
61 | // helping functions
|
61 | // helping functions
|
62 | void partitioning(double npp); |
62 | void partitioning(double npp); |
63 | // state variables
|
63 | // state variables
|