void RendererUtils::calculateSceneBounds( const Model& scene, AxisAlignedBox& outBounds ) { List< const GeometryComponent* > geometry; EntityUtils::collectNodesByType< GeometryComponent >( scene.getRoot(), geometry ); AxisAlignedBox nodeBounds; for ( List< const GeometryComponent* >::iterator it = geometry.begin(); !it.isEnd(); ++it ) { const GeometryComponent* geomComp = *it; geomComp->getBoundingBox( nodeBounds ); outBounds.add( nodeBounds, outBounds ); } }