Definition at line 348 of file ViewerPointCloud.h. References OglGui::ViewerPoint::AnimatePoint(), OglGui::ViewerPoint::cMagicNr, LoadViewImage(), mAnimation, mMaxVisibleImages, mMaxX, mMaxY, mMinX, mMinY, mNrOfPoints, mOglImageCache, OglGui::OglWindow::mOglWnd, mPtDocX, mPtDocY, mScale, mStarted, OglGui::ViewerPoint::PointX(), and OglGui::ViewerPoint::PointY(). Referenced by DisplayFunc(). 00349 { 00350 float hW = w/2.f, hH = h/2.f; 00351 float minHWPlusPtDocX = -hW+mPtDocX; 00352 float minHHPlusPtDocY = -hH+mPtDocY; 00353 int nrVisible = 0; 00354 00355 mMinX = mMinY = 1000000; 00356 mMaxX = mMaxY = -1000000; 00357 mNrOfPoints = 0; 00358 LIST *obj, *objList = mOglWnd->objectList; 00359 ForAllElements(obj, objList) 00360 { 00361 OGLVIEW* view = (OGLVIEW*) obj->info; 00362 if (!(view->SysData2 == (void*) ViewerPoint::cMagicNr)) 00363 continue; 00364 ViewerPoint* vp = (ViewerPoint*) view->SysData1; 00365 mNrOfPoints++; 00366 if (view->tags & ignoreTag) 00367 continue; 00368 if (mAnimation && mStarted) 00369 vp->AnimatePoint(); 00370 00371 float x = vp->PointX(), y = vp->PointY(); 00372 float wndX = hW + mScale * (x+minHWPlusPtDocX); 00373 float wndY = hH + mScale * (y+minHHPlusPtDocY); 00374 int zW = mScale; 00375 if(view->im && view->im->w && view->im->h) 00376 zW *= view->im->w/(float)view->im->h; 00377 int vW = view->w = zW; 00378 int vH = view->h = mScale; 00379 int vX = view->x = wndX - vW/2.f; 00380 int vY = view->y = wndY - vH/2.f; 00381 00382 if (x<mMinX) mMinX = x; 00383 if (x>mMaxX) mMaxX = x; 00384 if (y<mMinY) mMinY = y; 00385 if (y>mMaxY) mMaxY = y; 00386 00387 if (vX+vW > 0 && vX < w && vY+vH > 0 && vY < h) 00388 { 00389 view->tags |= visibleTag; 00390 if (++nrVisible > mMaxVisibleImages && mOglImageCache) 00391 { 00392 viewSys.SetImage(view, 0); 00393 continue; 00394 } 00395 if (view->im || (view->im = LoadViewImage(vp))) 00396 { 00397 view->zoomX = vW / (float) view->im->w; 00398 view->zoomY = vH / (float) view->im->h; 00399 } 00400 } 00401 else 00402 { 00403 view->tags &= ~visibleTag; 00404 if (view->im && mOglImageCache) 00405 viewSys.SetImage(view,0); 00406 } 00407 } 00408 }
Here is the call graph for this function:
|