19#include "TGLIncludes.h"
70 if (
fM->fPols.empty())
return;
74 if (
fM->GetMiniFrame())
76 std::map<Edge_t, Int_t> edges;
79 i !=
fM->fPols.end(); ++i)
81 for(
Int_t k = 0; k < i->fNPnts - 1; ++k)
83 ++edges[
Edge_t(i->fPnts[k], i->fPnts[k+1])];
85 ++edges[
Edge_t(i->fPnts[0], i->fPnts[i->fNPnts - 1])];
89 for (std::map<Edge_t, Int_t>::iterator i = edges.begin(); i != edges.end(); ++i)
93 glVertex3fv(
fM->fPnts[i->first.fI].Arr());
94 glVertex3fv(
fM->fPnts[i->first.fJ].Arr());
104 i !=
fM->fPols.end(); ++i)
106 glBegin(GL_LINE_LOOP);
107 for(
Int_t k = 0; k < i->fNPnts; ++k)
109 glVertex3fv(
fM->fPnts[i->fPnts[k]].Arr());
121 if (
fM->fPols.empty())
return;
123 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
125 glDisable(GL_LIGHTING);
126 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
127 glEnable(GL_COLOR_MATERIAL);
128 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
129 glDisable(GL_CULL_FACE);
135 glEnable(GL_POLYGON_OFFSET_FILL);
136 glPolygonOffset(1, 1);
141 i !=
fM->fPols.end(); ++i)
144 Int_t pntsN = (*i).fNPnts;
148 for (
Int_t k = 0; k < pntsN; ++k)
151 glVertex3fv(pnts[vi].Arr());
157 gluBeginPolygon(tessObj);
158 gluNextContour(tessObj, (GLenum)GLU_UNKNOWN);
162 for (
Int_t k = 0; k < pntsN; ++k)
165 coords[0] = pnts[vi].
fX;
166 coords[1] = pnts[vi].
fY;
167 gluTessVertex(tessObj, coords, pnts[vi].Arr());
169 gluEndPolygon(tessObj);
172 glDisable(GL_POLYGON_OFFSET_FILL);
178 glEnable(GL_LINE_SMOOTH);
196 if (
fM->GetHighlightFrame())
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
TEveVectorT< Float_t > TEveVector
void DrawOutline() const
Draw polygons outline.
void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *pshp, Int_t lvl=-1) const override
Draw polygons in highlight mode.
void SetBBox() override
Setup bounding-box information.
void Draw(TGLRnrCtx &rnrCtx) const override
Draw function for TEvePolygonSetProjectedGL.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Do GL rendering.
TEvePolygonSetProjected * fM
TEvePolygonSetProjectedGL()
Constructor.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
vpPolygon_t::const_iterator vpPolygon_ci
TGLColor & Selection(Int_t i)
const UChar_t * CArr() const
virtual void Draw(TGLRnrCtx &rnrCtx) const
Draw the GL drawable, using draw flags.
TT * SetModelDynCast(TObject *obj)
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.
Concrete physical shape - a GL drawable.
UChar_t GetSelected() const
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
Bool_t IsDrawPassOutlineLine() const
static UInt_t LockColor()
Prevent further color changes.
static UInt_t UnlockColor()
Allow color changes.
static void Color(const TGLColor &color)
Set color from TGLColor.
static GLUtesselator * GetDrawTesselator3fv()
Returns a tesselator for direct drawing when using 3-vertices with single precision.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Mother of all ROOT objects.