FACT++  1.0
void BasicGlCamera::drawCamera ( bool  alsoWire)
protectedvirtual

Reimplemented in RawDataViewer, and QCameraWidget.

Definition at line 749 of file BasicGlCamera.cc.

References ACTUAL_NUM_PIXELS, bb, color(), drawHexagon(), fcSlice, fData, fPixelStride, gg, i, pixelsColor, rr, and ss.

Referenced by paintGL(), and PixelAtPosition().

750  {
751 // cout << "Super PaintGL" << endl;
752  glColor3f(0.5,0.5,0.5);
753  glLineWidth(1.0);
754  float color;
755 
756  for (int i=0;i<ACTUAL_NUM_PIXELS;i++)
757  {
758  color = float(fData[i*fPixelStride+fcSlice]);// + ]eventData[nRoi*i + whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1);
759  int index = 0;
760  while (ss[index] < color)
761  index++;
762  index--;
763  float weight0 = (color-ss[index]) / (ss[index+1]-ss[index]);
764  float weight1 = 1.0f-weight0;
765  pixelsColor[i][0] = weight1*rr[index] + weight0*rr[index+1];
766  pixelsColor[i][1] = weight1*gg[index] + weight0*gg[index+1];
767  pixelsColor[i][2] = weight1*bb[index] + weight0*bb[index+1];
768  }
769 
770  for (int i=0;i<ACTUAL_NUM_PIXELS;i++)
771  {
772  // if (i == 690 ||
773  // i == 70)
774  // continue;
775  glColor3fv(pixelsColor[i]);
776  glLoadName(i);
777 
778  drawHexagon(i,true);
779 
780  }
781  if (!alsoWire)
782  return;
783  glColor3f(0.0f,0.0f,0.0f);
784  for (int i=0;i<ACTUAL_NUM_PIXELS;i++)
785  {
786 // if (i == 690 ||
787 // i == 70)
788 // continue;
789  drawHexagon(i, false);
790  }
791  }
int i
Definition: db_dim_client.c:21
std::vector< double > fData
GLfloat pixelsColor[NPIX][3]
#define ACTUAL_NUM_PIXELS
Definition: BasicGlCamera.h:9
void drawHexagon(int index, bool solid)
function color(col)
Definition: color.js:31

+ Here is the call graph for this function:

+ Here is the caller graph for this function: