Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Application::Videolympics::PhysicsEngine::FlushStacks (  )  [inline]

Definition at line 259 of file PhysicsEngine.h.

References GetStack(), ILOG_DEBUG, ILOG_ERROR, mFlushCounter, mIsFlushing, mParts, and mStacks.

Referenced by Impala::Application::Videolympics::VidolviWindow::DisplayFunc().

00260     {
00261         if (mIsFlushing)
00262             return;
00263 
00264         ILOG_DEBUG("Flushing stacks...");
00265         // clear the stacks:
00266         std::map<int, std::vector<PhysicsPart*>* >::iterator stackiter = mStacks.begin();
00267         for (stackiter = mStacks.begin(); stackiter != mStacks.end(); stackiter++)
00268         {
00269             int stackno = stackiter->first;
00270             ILOG_DEBUG("Cleaning stack " << stackno);
00271             std::vector <PhysicsPart*>* s = GetStack(stackno);
00272             s->clear();
00273         }
00274 
00275         // move the parts, and request deletion:
00276         for (int i = 0; i < mParts.size(); i++) {
00277             PhysicsPart *p = mParts[i];
00278             if (p == NULL) {
00279                 ILOG_ERROR("DoPhysics - PhysicsPart " << i << " = NULL.");
00280                 continue;
00281             }
00282 
00283             if (p->IsDestroying())
00284                 continue;
00285 
00286             p->MoveRelative(0.0f, +10.0f, 0.0f);
00287         }
00288 
00289         mIsFlushing = true;
00290         mFlushCounter = 100;
00291     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:55:07 2010 for ImpalaSrc by  doxygen 1.5.1