FACT++  1.0
void BasicGlCamera::DrawScale ( )
protected

Definition at line 452 of file BasicGlCamera.cc.

References bb, gg, i, logScale, rr, shownSizex, shownSizey, tooHighValueCoulour, and tooLowValueCoulour.

Referenced by QCameraWidget::paintGL(), and RawDataViewer::paintGL().

453  {
454  glPushMatrix();
455  glLoadIdentity();
456  glPushAttrib(GL_POLYGON_BIT);
457  glShadeModel(GL_SMOOTH);
458  glBegin(GL_QUADS);
459  float oneX = shownSizex/2.f - shownSizex/50.f;
460  float twoX = shownSizex/2.f;
461  float oneY = -shownSizey/2.f;
462  float twoY = -shownSizey/4.f;
463  float threeY = 0;
464  float fourY = shownSizey/4.f;
465  float fiveY = shownSizey/2.f;
466  glColor3f(rr[0], gg[0], bb[0]);
467  glVertex2f(oneX, oneY);
468  glVertex2f(twoX, oneY);
469  glColor3f(rr[1], gg[1], bb[1]);
470  glVertex2f(twoX, twoY);
471  glVertex2f(oneX, twoY);
472 
473  glVertex2f(oneX, twoY);
474  glVertex2f(twoX, twoY);
475  glColor3f(rr[2], gg[2], bb[2]);
476  glVertex2f(twoX, threeY);
477  glVertex2f(oneX, threeY);
478 
479  glVertex2f(oneX, threeY);
480  glVertex2f(twoX, threeY);
481  glColor3f(rr[3], gg[3], bb[3]);
482  glVertex2f(twoX, fourY);
483  glVertex2f(oneX, fourY);
484 
485  glVertex2f(oneX, fourY);
486  glVertex2f(twoX, fourY);
487  glColor3f(rr[4], gg[4], bb[4]);
488  glVertex2f(twoX, fiveY);
489  glVertex2f(oneX, fiveY);
490  float zeroX = oneX - shownSizex/50.f;
491  float zeroY = fiveY - shownSizey/50.f;
492  glColor3fv(tooHighValueCoulour);
493  glVertex2f(zeroX, fiveY);
494  glVertex2f(oneX, fiveY);
495  glVertex2f(oneX, zeroY);
496  glVertex2f(zeroX, zeroY);
497  glColor3fv(tooLowValueCoulour);
498  glVertex2f(zeroX, -fiveY);
499  glVertex2f(oneX, -fiveY);
500  glVertex2f(oneX, -zeroY);
501  glVertex2f(zeroX, -zeroY);
502  glEnd();
503  glTranslatef(0,0,0.1f);
504 
505  //draw linear/log tick marks
506  glColor3f(0.f,0.f,0.f);
507  glBegin(GL_LINES);
508  float value;
509  for (int i=1;i<10;i++)
510  {
511  if (logScale)
512  value = log10(i);
513  else
514  value = (float)(i)/10.f;
515  float yy = -shownSizey/2.f + value*shownSizey;
516  glVertex2f(oneX, yy);
517  glVertex2f(twoX, yy);
518  }
519  glEnd();
520  glPopAttrib();
521  glPopMatrix();
522  }
int i
Definition: db_dim_client.c:21
GLfloat tooLowValueCoulour[3]
Definition: BasicGlCamera.h:71
GLfloat tooHighValueCoulour[3]
Definition: BasicGlCamera.h:70

+ Here is the caller graph for this function: