Subversion Repositories public iLand

Rev

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

Rev 451 Rev 452
Line 262... Line 262...
262
        mStatistics.add(mRUSpecies[i].statistics());
262
        mStatistics.add(mRUSpecies[i].statistics());
263
    }
263
    }
264
    mStatistics.calculate();
264
    mStatistics.calculate();
265
    mAverageAging = mStatistics.leafAreaIndex()>0.?mAverageAging / (mStatistics.leafAreaIndex()*area()):0.;
265
    mAverageAging = mStatistics.leafAreaIndex()>0.?mAverageAging / (mStatistics.leafAreaIndex()*area()):0.;
266
}
266
}
-
 
267
-
 
268
void ResourceUnit::setSaplingHeightAt(const QPoint &position, const float height)
-
 
269
{
-
 
270
    Q_ASSERT(mSaplingHeightMap);
-
 
271
    int pixel_index = cPxPerRU*(position.x()-mCornerCoord.x())+(position.y()-mCornerCoord.y());
-
 
272
    if (pixel_index<0 || pixel_index>=cPxPerRU*cPxPerRU)
-
 
273
        qDebug() << "setSaplingHeightAt-Error";
-
 
274
    else
-
 
275
        mSaplingHeightMap[pixel_index]=height;
-
 
276
}
-
 
277