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

Method getItems

Engine/source/forest/forestCell.cpp:408–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408void ForestCell::getItems( Vector<ForestItem> *outItems ) const
409{
410 Vector<const ForestCell*> stack;
411 stack.push_back( this );
412
413 // Now loop till we run out of cells.
414 while ( !stack.empty() )
415 {
416 // Pop off the next cell.
417 const ForestCell *cell = stack.last();
418 stack.pop_back();
419
420 // Recurse thru non-leaf cells.
421 if ( !cell->isLeaf() )
422 {
423 stack.merge( cell->mSubCells, 4 );
424 continue;
425 }
426
427 // Get the items.
428 outItems->merge( cell->getItems() );
429 }
430}
431
432void ForestCell::buildPhysicsRep( Forest *forest )
433{

Callers 9

prepRenderImageMethod · 0.45
buildConvexMethod · 0.45
buildPolyListMethod · 0.45
getLocalWindTreesMethod · 0.45
deleteMeshSafeMethod · 0.45
onRender2DMethod · 0.45
_paintMethod · 0.45
_eraseMethod · 0.45

Calls 6

push_backMethod · 0.45
emptyMethod · 0.45
lastMethod · 0.45
pop_backMethod · 0.45
isLeafMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected