15#include "TGLIncludes.h"
47 Int_t nPoints =
b.fFrameSize / 3;
48 for (
Int_t i = 0; i < nPoints; ++i, p += 3)
59 glVertex3fv(p); glVertex3fv(p + 3);
60 glVertex3fv(p + 6); glVertex3fv(p + 9);
64 glVertex3fv(p + 21); glVertex3fv(p + 18);
65 glVertex3fv(p + 15); glVertex3fv(p + 12);
69 glVertex3fv(p); glVertex3fv(p + 12);
70 glVertex3fv(p + 15); glVertex3fv(p + 3);
74 glVertex3fv(p + 9); glVertex3fv(p + 6);
75 glVertex3fv(p + 18); glVertex3fv(p + 21);
79 glVertex3fv(p); glVertex3fv(p + 9);
80 glVertex3fv(p + 21); glVertex3fv(p + 12);
84 glVertex3fv(p + 3); glVertex3fv(p + 15);
85 glVertex3fv(p + 18); glVertex3fv(p + 6);
91 glVertex3fv(p); glVertex3fv(p + 3);
92 glVertex3fv(p + 6); glVertex3fv(p + 9);
94 glVertex3fv(p + 12); glVertex3fv(p + 15);
95 glVertex3fv(p + 18); glVertex3fv(p + 21);
99 glVertex3fv(p + 3); glVertex3fv(p + 15);
100 glVertex3fv(p + 6); glVertex3fv(p + 18);
101 glVertex3fv(p + 9); glVertex3fv(p + 21);
114 glPushAttrib(GL_POLYGON_BIT | GL_LINE_BIT | GL_ENABLE_BIT);
116 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
117 glEnable(GL_COLOR_MATERIAL);
118 glDisable(GL_CULL_FACE);
123 glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &lmts);
124 if (!lmts) glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,
GL_TRUE);
126 glEnable(GL_POLYGON_OFFSET_FILL);
127 glPolygonOffset(2, 2);
128 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
130 if (
b.fBackRGBA[3] < 255)
139 if (!lmts) glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,
GL_FALSE);
142 glDisable(GL_LIGHTING);
143 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
145 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
146 glEnable(GL_LINE_SMOOTH);
A class encapsulating GL rendering of TEveFrameBox via a static member function.
static void RenderFrame(const TEveFrameBox &b, Bool_t fillp)
Render the frame with GL.
static void Render(const TEveFrameBox *box)
Render the frame-box with GL.
Description of a 2D or 3D frame that can be used to visually group a set of objects.
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
T * Normal2Plane(const T v1[3], const T v2[3], const T v3[3], T normal[3])
Calculate a normal vector of a plane.