Subversion Repositories public iLand

Rev

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

Rev 863 Rev 1002
Line 106... Line 106...
106
            Q_ASSERT(mSaplingHeightMap);
106
            Q_ASSERT(mSaplingHeightMap);
107
            int pixel_index = cPxPerRU*(position.x()-mCornerCoord.x())+(position.y()-mCornerCoord.y());
107
            int pixel_index = cPxPerRU*(position.x()-mCornerCoord.x())+(position.y()-mCornerCoord.y());
108
            float h =  mSaplingHeightMap[pixel_index];
108
            float h =  mSaplingHeightMap[pixel_index];
109
            return h;
109
            return h;
110
    }
110
    }
-
 
111
    /// access to the internal sapling height map pointer
-
 
112
    const float *saplingHeightMapPointer() const {return mSaplingHeightMap; }
111
    /// return maximum sapling height at point 'position' (LIF-index). This call is slower but works witout a prior call
113
    /// return maximum sapling height at point 'position' (LIF-index). This call is slower but works witout a prior call
112
    /// to setSaplingHeightMap().
114
    /// to setSaplingHeightMap().
113
    float saplingHeightForInit(const QPoint &position) const;
115
    float saplingHeightForInit(const QPoint &position) const;
114
    /// set the height of the sapling map to the maximum of current value and 'height'.
116
    /// set the height of the sapling map to the maximum of current value and 'height'.
115
    void setMaxSaplingHeightAt(const QPoint &position, const float height);
117
    void setMaxSaplingHeightAt(const QPoint &position, const float height);