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

void Impala::Application::Videolympics::PhysicsEngine::MoveStackUp ( int  stackno  )  [inline]

Definition at line 221 of file PhysicsEngine.h.

References Impala::Application::Videolympics::PhysicsPart::DoDestroyPart(), GetStack(), ILOG_DEBUG, mIsFlushing, and mMaxImagesOnRow.

Referenced by RegisterPart().

00222     {
00223         if (mIsFlushing)
00224         {
00225             ILOG_DEBUG("MoveStackUp: still flushing, ignored.");
00226             return;
00227         }
00228 
00229         std::vector <PhysicsPart*>* s = GetStack(stackno);
00230         ILOG_DEBUG("MoveStackUp: " << stackno << " contains " << s->size() << " shots.");
00231         for (int i = 0; i < s->size(); i++) {
00232             PhysicsPart *p = (*s)[i];
00233             if (p == NULL)
00234                 continue;
00235             p->MoveRelative(0.0f, 1.0f, 0.0f);
00236         }
00237 
00238         int mMaxStackSize = mMaxImagesOnRow; // 12
00239         if (s->size() > mMaxStackSize)
00240         {
00241             int toRemove = s->size() - mMaxStackSize;
00242             ILOG_DEBUG("Removing " << toRemove << " shots...");
00243             std::vector<PhysicsPart*>::iterator here = s->begin();
00244             while (toRemove > 0)
00245             {
00246                 PhysicsPart *p = *here;
00247                 if (p == NULL)
00248                     continue;
00249                 p->DoDestroyPart();
00250                 here++;
00251                 toRemove--;
00252             }
00253             here--;
00254             s->erase(s->begin(), here);
00255         }
00256     }

Here is the call graph for this function:


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