42 fM = SetModelDynCast<TEvePolygonSetProjected>(obj);
71 if (
fM->
fPols.size() == 0)
return;
77 std::map<Edge_t, Int_t> edges;
82 for(
Int_t k = 0; k < i->fNPnts - 1; ++k)
84 ++edges[
Edge_t(i->fPnts[k], i->fPnts[k+1])];
86 ++edges[
Edge_t(i->fPnts[0], i->fPnts[i->fNPnts - 1])];
90 for (std::map<Edge_t, Int_t>::iterator i = edges.begin(); i != edges.end(); ++i)
107 glBegin(GL_LINE_LOOP);
108 for(
Int_t k = 0; k < i->fNPnts; ++k)
122 if (
fM->
fPols.size() == 0)
return;
124 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
126 glDisable(GL_LIGHTING);
127 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
128 glEnable(GL_COLOR_MATERIAL);
129 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
130 glDisable(GL_CULL_FACE);
136 glEnable(GL_POLYGON_OFFSET_FILL);
137 glPolygonOffset(1, 1);
145 Int_t pntsN = (*i).fNPnts;
149 for (
Int_t k = 0; k < pntsN; ++k)
152 glVertex3fv(pnts[vi].Arr());
158 gluBeginPolygon(tessObj);
159 gluNextContour(tessObj, (GLenum)GLU_UNKNOWN);
163 for (
Int_t k = 0; k < pntsN; ++k)
166 coords[0] = pnts[vi].
fX;
167 coords[1] = pnts[vi].
fY;
168 gluTessVertex(tessObj, coords, pnts[vi].Arr());
170 gluEndPolygon(tessObj);
173 glDisable(GL_POLYGON_OFFSET_FILL);
179 glEnable(GL_LINE_SMOOTH);
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
static GLUtesselator * GetDrawTesselator3fv()
Returns a tesselator for direct drawing when using 3-vertices with single precision.
TEvePolygonSetProjectedGL()
Constructor.
static void Color(const TGLColor &color)
Set color from TGLColor.
TEvePolygonSetProjected * fM
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
void SetAxisAlignedBBox(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax)
Set axis-aligned bounding-box.
GL-renderer for TEvePolygonSetProjected class.
Bool_t IsDrawPassOutlineLine() const
UChar_t GetSelected() const
Concrete physical shape - a GL drawable.
const UChar_t * CArr() const
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *pshp, Int_t lvl=-1) const
Draw polygons in highlight mode.
Base-class for direct OpenGL renderers.
static UInt_t LockColor()
Prevent further color changes.
static UInt_t UnlockColor()
Allow color changes.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Do GL rendering.
virtual void Draw(TGLRnrCtx &rnrCtx) const
Draw function for TEvePolygonSetProjectedGL.
virtual void SetBBox()
Setup bounding-box information.
vpPolygon_t::const_iterator vpPolygon_ci
virtual Bool_t GetMiniFrame() const
void DrawOutline() const
Draw polygons outline.
Mother of all ROOT objects.
virtual void Draw(TGLRnrCtx &rnrCtx) const
Draw the GL drawable, using draw flags.
TGLColor & Selection(Int_t i)
virtual Bool_t GetHighlightFrame() const
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).