Logo ROOT   6.14/05
Reference Guide
TEvePlot3DGL.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel, 2009
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TEvePlot3DGL.h"
13 #include "TEvePlot3D.h"
14 #include "TGLPlot3D.h"
15 
16 #include "TGLRnrCtx.h"
17 #include "TGLIncludes.h"
18 
19 /** \class TEvePlot3DGL
20 \ingroup TEve
21 OpenGL renderer class for TEvePlot3D.
22 */
23 
25 
26 ////////////////////////////////////////////////////////////////////////////////
27 /// Constructor.
28 
30  TGLObject(), fM(0), fPlotLogical(0)
31 {
32  fDLCache = kFALSE; // Disable display list.
33 }
34 
35 ////////////////////////////////////////////////////////////////////////////////
36 /// Set model object.
37 
39 {
40  fM = SetModelDynCast<TEvePlot3D>(obj);
42  return kTRUE;
43 }
44 
45 ////////////////////////////////////////////////////////////////////////////////
46 /// Set bounding box.
47 
49 {
50  // !! This ok if master sub-classed from TAttBBox
51  //SetAxisAlignedBBox(((TEvePlot3D*)fExternalObj)->AssertBBox());
53 }
54 
55 ////////////////////////////////////////////////////////////////////////////////
56 /// Render with OpenGL.
57 
58 void TEvePlot3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
59 {
60  // printf("TEvePlot3DGL::DirectDraw LOD %d\n", rnrCtx.CombiLOD());
61  if (fPlotLogical)
62  {
63  fPlotLogical->DirectDraw(rnrCtx);
64  }
65 }
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
const char Option_t
Definition: RtypesCore.h:62
Bool_t fLogZ
Definition: TEvePlot3D.h:32
static TGLPlot3D * CreatePlot(TH3 *h, TPolyMarker3D *pm)
Create GL plot for specified TH3 and polymarker.
Definition: TGLPlot3D.cxx:87
TGLPlot3D * fPlotLogical
Definition: TEvePlot3DGL.h:31
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
virtual void SetBBox()
Set bounding box.
TObject * fPlot
Definition: TEvePlot3D.h:27
Base-class for direct OpenGL renderers.
Definition: TGLObject.h:21
OpenGL renderer class for TEvePlot3D.
Definition: TEvePlot3DGL.h:23
Bool_t fLogY
Definition: TEvePlot3D.h:31
const TGLBoundingBox & BoundingBox() const
TString fPlotOption
Definition: TEvePlot3D.h:28
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const =0
const Bool_t kFALSE
Definition: RtypesCore.h:88
#define ClassImp(name)
Definition: Rtypes.h:359
Bool_t fLogX
Definition: TEvePlot3D.h:30
Mother of all ROOT objects.
Definition: TObject.h:37
TEvePlot3D * fM
Definition: TEvePlot3DGL.h:30
TGLBoundingBox fBoundingBox
Also plays the role of ID.
Bool_t fDLCache
display-list validity bit-field
const Bool_t kTRUE
Definition: RtypesCore.h:87
TEvePlot3DGL()
Constructor.