Subversion Repositories public iLand

Rev

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

Rev 170 Rev 187
Line 31... Line 31...
31
31
32
    Tree::resetStatistics();
32
    Tree::resetStatistics();
33
    if (forEachCell) {
33
    if (forEachCell) {
34
        loadFromPicus(fileName); // load in initial grid cell
34
        loadFromPicus(fileName); // load in initial grid cell
35
        // we assume that all stands are equal, so wie simply COPY the trees and modify them afterwards
35
        // we assume that all stands are equal, so wie simply COPY the trees and modify them afterwards
36
        const Grid<RessourceUnit*> &ruGrid=mModel->RUgrid();
-
 
37
        RessourceUnit **p = ruGrid.begin();
-
 
-
 
36
        const Grid<ResourceUnit*> &ruGrid=mModel->RUgrid();
-
 
37
        ResourceUnit **p = ruGrid.begin();
38
        ++p; // skip the first...
38
        ++p; // skip the first...
39
        const QVector<Tree> &tocopy = mModel->ru()->trees();
39
        const QVector<Tree> &tocopy = mModel->ru()->trees();
40
        for (; p!=ruGrid.end(); ++p) {
40
        for (; p!=ruGrid.end(); ++p) {
41
            QRectF rect = (*p)->boundingBox();
41
            QRectF rect = (*p)->boundingBox();
42
            foreach(const Tree& tree, tocopy) {
42
            foreach(const Tree& tree, tocopy) {
Line 74... Line 74...
74
                t->enableDebugging();
74
                t->enableDebugging();
75
        }
75
        }
76
    }
76
    }
77
}
77
}
78
78
79
void StandLoader::loadFromPicus(const QString &fileName, QPointF offset, RessourceUnit *ru)
-
 
-
 
79
void StandLoader::loadFromPicus(const QString &fileName, QPointF offset, ResourceUnit *ru)
80
{
80
{
81
    if (!ru)
81
    if (!ru)
82
        ru = mModel->ru();
82
        ru = mModel->ru();
83
    SpeciesSet *speciesSet = mModel->ru()->speciesSet(); // of default RU
83
    SpeciesSet *speciesSet = mModel->ru()->speciesSet(); // of default RU
84
84