Subversion Repositories public iLand

Rev

Rev 212 | Rev 247 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 212 Rev 234
Line 21... Line 21...
21
    // access to properties
21
    // access to properties
22
    int id() const { return mId; }
22
    int id() const { return mId; }
23
    int age() const { return mAge; }
23
    int age() const { return mAge; }
24
    /// @property position The tree does not store the floating point coordinates but only the index of pixel on the LIF grid
24
    /// @property position The tree does not store the floating point coordinates but only the index of pixel on the LIF grid
25
    const QPointF position() const { Q_ASSERT(mGrid!=0); return mGrid->cellCenterPoint(mPositionIndex); }
25
    const QPointF position() const { Q_ASSERT(mGrid!=0); return mGrid->cellCenterPoint(mPositionIndex); }
26
    float dbh() const { return mDbh; }
-
 
27
    float height() const { return mHeight; }
-
 
28
    const Species* species() const { Q_ASSERT(mRU!=0); return mSpecies; } ///< pointer to the tree species of the tree.
26
    const Species* species() const { Q_ASSERT(mRU!=0); return mSpecies; } ///< pointer to the tree species of the tree.
29
    const ResourceUnit *ru() const { Q_ASSERT(mRU!=0); return mRU; } ///< pointer to the ressource unit the tree belongs to.
27
    const ResourceUnit *ru() const { Q_ASSERT(mRU!=0); return mRU; } ///< pointer to the ressource unit the tree belongs to.
30
28
31
    float lightResourceIndex() const { return mLRI; } ///< LRI of the tree (update during readStamp())
-
 
-
 
29
    // properties
-
 
30
    float dbh() const { return mDbh; } ///< dimater at breast height in cm
-
 
31
    float height() const { return mHeight; } ///< tree height in m
-
 
32
    float lightResourceIndex() const { return mLRI; } ///< LRI of the tree (updated during readStamp())
-
 
33
    float leafArea() const { return mLeafArea; } ///< leaf area (m2) of the tree
32
    double volume() const; ///< volume (m3) of stem volume based on geometry and density calculated on the fly.
34
    double volume() const; ///< volume (m3) of stem volume based on geometry and density calculated on the fly.
33
    double basalArea() const; ///< basal area of the tree at breast height in m2
35
    double basalArea() const; ///< basal area of the tree at breast height in m2
34
    bool isDead() const { return flag(Tree::TreeDead); } ///< returns true if the tree is already dead.
36
    bool isDead() const { return flag(Tree::TreeDead); } ///< returns true if the tree is already dead.
35
    // actions
37
    // actions
36
    void die() { setFlag(Tree::TreeDead, true); } ///< kills the tree.
38
    void die() { setFlag(Tree::TreeDead, true); } ///< kills the tree.