41 fM = SetModelDynCast<TEveBox>(obj);
63 Float_t d = sqrtf(o[0]*o[0] + o[1]*o[1] + o[2]*o[2]);
80 glBegin(GL_LINE_STRIP);
81 glVertex3fv(p[0]); glVertex3fv(p[1]);
82 glVertex3fv(p[5]); glVertex3fv(p[6]);
83 glVertex3fv(p[2]); glVertex3fv(p[3]);
84 glVertex3fv(p[7]); glVertex3fv(p[4]);
85 glVertex3fv(p[0]); glVertex3fv(p[3]);
89 glVertex3fv(p[1]); glVertex3fv(p[2]);
90 glVertex3fv(p[4]); glVertex3fv(p[5]);
91 glVertex3fv(p[6]); glVertex3fv(p[7]);
103 glNormal3f(0, 0, -1);
104 glVertex3fv(p[0]); glVertex3fv(p[1]);
105 glVertex3fv(p[2]); glVertex3fv(p[3]);
108 glVertex3fv(p[7]); glVertex3fv(p[6]);
109 glVertex3fv(p[5]); glVertex3fv(p[4]);
112 glVertex3fv(p[0]); glVertex3fv(p[4]);
113 glVertex3fv(p[5]); glVertex3fv(p[1]);
115 glNormal3f(0, -1, 0);
116 glVertex3fv(p[3]); glVertex3fv(p[2]);
117 glVertex3fv(p[6]); glVertex3fv(p[7]);
119 glNormal3f(-1, 0, 0);
120 glVertex3fv(p[0]); glVertex3fv(p[3]);
121 glVertex3fv(p[7]); glVertex3fv(p[4]);
124 glVertex3fv(p[1]); glVertex3fv(p[5]);
125 glVertex3fv(p[6]); glVertex3fv(p[2]);
136 subtract_and_normalize(p[1], p[0], e[0]);
137 subtract_and_normalize(p[3], p[0], e[1]);
138 subtract_and_normalize(p[4], p[0], e[2]);
139 subtract_and_normalize(p[5], p[6], e[3]);
140 subtract_and_normalize(p[7], p[6], e[4]);
141 subtract_and_normalize(p[2], p[6], e[5]);
147 glVertex3fv(p[0]); glVertex3fv(p[1]);
148 glVertex3fv(p[2]); glVertex3fv(p[3]);
151 glVertex3fv(p[7]); glVertex3fv(p[6]);
152 glVertex3fv(p[5]); glVertex3fv(p[4]);
155 glVertex3fv(p[0]); glVertex3fv(p[4]);
156 glVertex3fv(p[5]); glVertex3fv(p[1]);
159 glVertex3fv(p[3]); glVertex3fv(p[2]);
160 glVertex3fv(p[6]); glVertex3fv(p[7]);
163 glVertex3fv(p[0]); glVertex3fv(p[3]);
164 glVertex3fv(p[7]); glVertex3fv(p[4]);
167 glVertex3fv(p[1]); glVertex3fv(p[5]);
168 glVertex3fv(p[6]); glVertex3fv(p[2]);
207 glPushAttrib(GL_ENABLE_BIT);
209 glEnable(GL_POLYGON_OFFSET_FILL);
210 glPolygonOffset(1.0
f, 1.0
f);
212 glDisable(GL_POLYGON_OFFSET_FILL);
248 fM = SetModelDynCast<TEveBoxProjected>(obj);
271 for (
Int_t i = 0; i <
B; ++i)
278 for (
Int_t i = B; i <
N; ++i)
317 for (
Int_t i = 0; i <
N; ++i)
334 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
336 glDisable(GL_LIGHTING);
338 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
339 glEnable(GL_COLOR_MATERIAL);
340 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
341 glDisable(GL_CULL_FACE);
343 glEnable(GL_POLYGON_OFFSET_FILL);
344 glPolygonOffset(1.0
f, 1.0
f);
346 glDisable(GL_POLYGON_OFFSET_FILL);
static Bool_t fgDebugCornerPoints
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
static void Color(const TGLColor &color)
Set color from TGLColor.
virtual void Draw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
virtual void Draw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
3D box with arbitrary vertices (cuboid).
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.
void RenderBoxAutoNorm(const Float_t p[8][3]) const
Render box, calculate normals on the fly from first three points.
Bool_t IsDrawPassOutlineLine() const
OpenGL renderer class for TEveBoxProjected.
Base-class for direct OpenGL renderers.
OpenGL renderer class for TEveBox.
TObject * fExternalObj
first replica
void RenderBoxStdNorm(const Float_t p[8][3]) const
Render box with standard axis-aligned normals.
TEveBoxProjectedGL()
Constructor.
virtual void SetBBox()
Set bounding box.
T * Cross(const T v1[3], const T v2[3], T out[3])
void RenderPoints(Int_t mode) const
Render points with given GL mode.
void RenderOutline(const Float_t p[8][3]) const
Render box with without normals.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL, create display-list.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Mother of all ROOT objects.
virtual void Draw(TGLRnrCtx &rnrCtx) const
Draw the GL drawable, using draw flags.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual void SetBBox()
Set bounding box.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL, create display-list.