Definition at line 128 of file SelectFrames.h. References mFrameNrs, and mNrExtra. Referenced by HandleDoneShot(). 00129 { 00130 int totalNr = mFrameNrs.size(); 00131 int part = totalNr / 3; 00132 if (totalNr % 3 != 0) 00133 part++; // begin and middle are more important 00134 std::vector<int> idxVec; 00135 for (int p=0 ; p<part ; p++) 00136 { 00137 for (int i=0 ; i<3 ; i++) 00138 { 00139 int idx = i*part + p; 00140 if (idx < totalNr) 00141 idxVec.push_back(idx); 00142 } 00143 } 00144 00145 int nrAdded = 0; 00146 int i = 0; 00147 while ((nrAdded < mNrExtra) && (i < idxVec.size())) 00148 { 00149 int frame = mFrameNrs[idxVec[i]]; 00150 if (std::find(keyframes.begin(), keyframes.end(), frame) == 00151 keyframes.end()) 00152 { 00153 keyframes.push_back(frame); 00154 nrAdded++; 00155 } 00156 i++; 00157 } 00158 }
|