| 360 | } |
| 361 | |
| 362 | bool ForestData::removeItem( ForestItemKey key, const Point3F &keyPosition ) |
| 363 | { |
| 364 | Point2I bucketkey = _getBucketKey( keyPosition ); |
| 365 | |
| 366 | ForestCell *bucket = _findBucket( keyPosition ); |
| 367 | |
| 368 | if ( !bucket || !bucket->removeItem( key, keyPosition, true ) ) |
| 369 | return false; |
| 370 | |
| 371 | if ( bucket->isEmpty() ) |
| 372 | { |
| 373 | delete bucket; |
| 374 | mBuckets.erase( bucketkey ); |
| 375 | } |
| 376 | |
| 377 | mIsDirty = true; |
| 378 | |
| 379 | return true; |
| 380 | } |
| 381 | |
| 382 | const ForestItem& ForestData::findItem( ForestItemKey key, const Point3F &keyPos ) const |
| 383 | { |
no test coverage detected