Definition at line 273 of file ViewerPointCloud.h. References OglGui::ViewerPoint::AnimatePoint(), OglGui::ViewerPoint::cMagicNr, OglGui::OglWindow::H(), mAnimation, mMaxX, mMaxY, mMinX, mMinY, mNrOfPoints, mOglImageCache, OglGui::OglWindow::mOglWnd, mPtDocX, mPtDocY, mScale, mStarted, OglGui::ViewerPoint::PointX(), OglGui::ViewerPoint::PointY(), and OglGui::OglWindow::W(). Referenced by DisplayFunc(). 00274 { 00275 ULONG selCol = mOglWnd->selectCol; 00276 int wndW = W(), wndH = H(); 00277 float hW = wndW/2.f, hH = wndH/2.f; 00278 int vW = (mScale > 1.f) ? mScale : 1; 00279 int vH = (mScale > 1.f) ? mScale : 1; 00280 float hVW = vW/2.f, hVH = vH/2.f; 00281 float minHWPlusPtDocX = -hW+mPtDocX; 00282 float minHHPlusPtDocY = -hH+mPtDocY; 00283 00284 mMinX = mMinY = 1000000; 00285 mMaxX = mMaxY = -1000000; 00286 mNrOfPoints = 0; 00287 glPushMatrix(); 00288 ptSize = (ptSize < 1.f) ? 1.f : ptSize; 00289 glPointSize(ptSize); 00290 glTranslatef(trX, trY, 0.f); 00291 glScalef(mScale, mScale, 1.f); 00292 00293 glBegin(GL_POINTS); 00294 LIST *obj, *objList = mOglWnd->objectList; 00295 ForAllElements(obj, objList) 00296 { 00297 OGLVIEW* view = (OGLVIEW*) obj->info; 00298 if (!(view->SysData2 == (void*) ViewerPoint::cMagicNr)) 00299 continue; 00300 ViewerPoint* vp = (ViewerPoint*) view->SysData1; 00301 mNrOfPoints++; 00302 view->tags &= ~visibleTag; 00303 if (view->tags & ignoreTag) 00304 continue; 00305 if (mAnimation && mStarted) 00306 vp->AnimatePoint(); 00307 if (mOglImageCache) 00308 viewSys.SetImage(view,0); 00309 float x = vp->PointX(), y = vp->PointY(); 00310 float wndX = hW + mScale * (x+minHWPlusPtDocX); 00311 float wndY = hH + mScale * (y+minHHPlusPtDocY); 00312 view->w = vW; 00313 view->h = vH; 00314 int vX = view->x = wndX - hVW; 00315 int vY = view->y = wndY - hVH; 00316 00317 if (x<mMinX) mMinX = x; 00318 if (x>mMaxX) mMaxX = x; 00319 if (y<mMinY) mMinY = y; 00320 if (y>mMaxY) mMaxY = y; 00321 00322 if (vX+vW<0 || vY+vH<0 || vX > wndW || vY > wndH) 00323 continue; 00324 00325 bool selected = (view->tags & selectedTag) != 0; 00326 ULONG borderCol = view->borderCol; 00327 SetColor(selected ? selCol : borderCol); 00328 00329 glVertex2f(x+offX, y+offY); 00330 if (selected && ptSize >= 3.f) 00331 { 00332 glEnd(); 00333 glPointSize(ptSize-2); 00334 glBegin(GL_POINTS); 00335 UCHAR r, g, b; 00336 COLOR2RGB(borderCol, r, g, b); 00337 glColor3ub(r, g, b); 00338 glVertex2f(x+offX, y+offY); 00339 glEnd(); 00340 glPointSize(ptSize); 00341 glBegin(GL_POINTS); 00342 } 00343 } 00344 glEnd(); 00345 glPopMatrix(); 00346 }
Here is the call graph for this function:
|