Rev 793 | Rev 848 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 793 | Rev 825 | ||
---|---|---|---|
Line 90... | Line 90... | ||
90 | mRemoved += to_kill; |
90 | mRemoved += to_kill; |
91 | return to_kill; |
91 | return to_kill; |
92 | }
|
92 | }
|
93 | 93 | ||
94 | 94 | ||
95 | int Management::kill() |
- | |
- | 95 | int Management::killAll() |
|
96 | {
|
96 | {
|
97 | int c = mTrees.count(); |
97 | int c = mTrees.count(); |
98 | for (int i=0;i<mTrees.count();i++) |
98 | for (int i=0;i<mTrees.count();i++) |
99 | mTrees[i].first->remove(); |
99 | mTrees[i].first->remove(); |
100 | mTrees.clear(); |
100 | mTrees.clear(); |
Line 247... | Line 247... | ||
247 | // no idea if this works!!!
|
247 | // no idea if this works!!!
|
248 | }
|
248 | }
|
249 | 249 | ||
250 | 250 | ||
251 | // from the range percentile range pctfrom to pctto (each 1..100)
|
251 | // from the range percentile range pctfrom to pctto (each 1..100)
|
252 | int Management::kill(int pctfrom, int pctto, int number) |
- | |
- | 252 | int Management::killPct(int pctfrom, int pctto, int number) |
|
253 | {
|
253 | {
|
254 | return remove_percentiles(pctfrom, pctto, number, false); |
254 | return remove_percentiles(pctfrom, pctto, number, false); |
255 | }
|
255 | }
|
256 | 256 | ||
257 | // from the range percentile range pctfrom to pctto (each 1..100)
|
257 | // from the range percentile range pctfrom to pctto (each 1..100)
|
258 | int Management::manage(int pctfrom, int pctto, int number) |
- | |
- | 258 | int Management::managePct(int pctfrom, int pctto, int number) |
|
259 | {
|
259 | {
|
260 | return remove_percentiles(pctfrom, pctto, number, true); |
260 | return remove_percentiles(pctfrom, pctto, number, true); |
261 | }
|
261 | }
|
262 | 262 | ||
263 | int Management::manage() |
- | |
- | 263 | int Management::manageAll() |
|
264 | {
|
264 | {
|
265 | int c = mTrees.count(); |
265 | int c = mTrees.count(); |
266 | for (int i=0;i<mTrees.count();i++) |
266 | for (int i=0;i<mTrees.count();i++) |
267 | mTrees[i].first->remove(removeFoliage(), |
267 | mTrees[i].first->remove(removeFoliage(), |
268 | removeBranch(), |
268 | removeBranch(), |
Line 339... | Line 339... | ||
339 | 339 | ||
340 | qDebug() << "filtering with" << filter << "N=" << n_before << "/" << mTrees.count() << "trees (before/after filtering)."; |
340 | qDebug() << "filtering with" << filter << "N=" << n_before << "/" << mTrees.count() << "trees (before/after filtering)."; |
341 | return mTrees.count(); |
341 | return mTrees.count(); |
342 | }
|
342 | }
|
343 | 343 | ||
344 | int Management::load(int ruindex) |
- | |
- | 344 | int Management::loadResourceUnit(int ruindex) |
|
345 | {
|
345 | {
|
346 | Model *m = GlobalSettings::instance()->model(); |
346 | Model *m = GlobalSettings::instance()->model(); |
347 | ResourceUnit *ru = m->ru(ruindex); |
347 | ResourceUnit *ru = m->ru(ruindex); |
348 | if (!ru) |
348 | if (!ru) |
349 | return -1; |
349 | return -1; |