Definition at line 47 of file VideoMinimap.h. References Impala::Visualization::ShotTrailPoint::decay, mDecay, mMaxLength, mShots, and Impala::Visualization::ShotTrailPoint::shot. Referenced by AddBrowserContext(), AddThread(), Impala::Visualization::RotorBrowser::RotorBrowser::AddToHistory(), Impala::Visualization::RotorBrowser::RotorBrowser::BookmarkActiveCenter(), Impala::Visualization::RotorBrowser::RotorBrowser::BookmarkSpecific(), and Impala::Visualization::RotorBrowser::RotorBrowser::UpdateViewsToContext(). 00048 { 00049 double d = 1.0; 00050 ShotTrailPoint p; 00051 p.shot = shot; 00052 p.decay = d; 00053 00054 mShots.insert(mShots.begin(), p); 00055 int ctr=0; 00056 for (std::vector<ShotTrailPoint>::iterator i = mShots.begin(); i!=mShots.end(); i++) 00057 { 00058 if (ctr>0 && (*i).shot == shot) 00059 { 00060 i=mShots.erase(i); 00061 i--; 00062 } 00063 (*i).decay = d; 00064 d -= mDecay; 00065 ctr++; 00066 if (d <= 0.0 || ctr > mMaxLength) 00067 { 00068 mShots.erase(i, mShots.end()); 00069 break; 00070 } 00071 } 00072 }
|