//----------------------------------------------------------------------------- void ActorTreeAbstract::prepareActors(ActorCollection& actors) { // finds the root transforms std::set< ITransform* > root_transforms; for(int i=0; i<(int)actors.size(); ++i) { for( ITransform* root = actors[i]->transform(); root; root = root->parent() ) if ( !root->parent() ) root_transforms.insert(root); } // setup the matrices std::set< ITransform* >::iterator tra = root_transforms.begin(); while( tra != root_transforms.end() ) { (*tra)->computeWorldMatrixRecursive(); ++tra; } // setup the Actor[s] bounding box and bounding sphere for(int i=0; i<(int)actors.size(); ++i) actors[i]->computeBounds(); }
//clear all actors void VLBaseView::flush( bool bUpdate ) { ActorCollection actors; sceneManager()->tree()->extractActors(actors); for (int i=0;i<actors.size();i++) { sceneManager()->tree()->eraseActor(actors[i].get()); mTextDebug = NULL; } if (bUpdate) { openglContext()->update(); } }