MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / removeItem

Method removeItem

Engine/source/forest/forestDataFile.cpp:362–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362bool 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
382const ForestItem& ForestData::findItem( ForestItemKey key, const Point3F &keyPos ) const
383{

Callers 1

forestDataFile.cppFile · 0.45

Calls 2

isEmptyMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected