CMS 3D CMS Logo

FWEveDigitSetScalableMarker.cc
Go to the documentation of this file.
1 #include "TGLIncludes.h"
3 
4 void FWEveDigitSetScalableMarkerGL::DirectDraw(TGLRnrCtx& rnrCtx) const {
5  glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_POINT_BIT);
6  glEnable(GL_POINT_SMOOTH);
7  glDisable(GL_LIGHTING);
8 
9  TEveChunkManager::iterator qi(fM->GetPlex());
10  if (rnrCtx.Highlight() && fHighlightSet)
11  qi.fSelection = fHighlightSet;
12 
13  if (rnrCtx.SecSelection())
14  glPushName(0);
15 
16  glPointSize(((FWEveDigitSetScalableMarker*)fM)->GetMarkerSize());
17  while (qi.next()) {
18  TEveQuadSet::QFreeQuad_t* q = (TEveQuadSet::QFreeQuad_t*)qi();
19  if (q->fValue < 0)
20  continue;
21  TGLUtil::ColorAlpha(Color_t(q->fValue));
22  if (rnrCtx.SecSelection())
23  glLoadName(qi.index());
24  float* p = &q->fVertices[0];
25  glBegin(GL_LINES);
26  float c[3] = {0.5f * (p[0] + p[6]), 0.5f * (p[1] + p[7]), 0.5f * (p[2] + p[8])};
27 
28  float d = p[6] - p[0];
29  glVertex3f(c[0] - d, c[1], c[2]);
30  glVertex3f(c[0] + d, c[1], c[2]);
31  glVertex3f(c[0], c[1] - d, c[2]);
32  glVertex3f(c[0], c[1] + d, c[2]);
33  glVertex3f(c[0], c[1], c[2] - d);
34  glVertex3f(c[0], c[1], c[2] + d);
35 
36  glEnd();
37 
38  glBegin(GL_POINTS);
39  glVertex3fv(&c[0]);
40  glEnd();
41  }
42 
43  glPopAttrib();
44 }
void DirectDraw(TGLRnrCtx &rnrCtx) const override
double f[11][100]
d
Definition: ztail.py:151