ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
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
TString fPlotOption
Definition: TEvePlot3D.h:28
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const =0
Bool_t fLogX
Definition: TEvePlot3D.h:30
Mother of all ROOT objects.
Definition: TObject.h:58
ClassImp(TEvePlot3DGL)
TEvePlot3D * fM
Definition: TEvePlot3DGL.h:30
const TGLBoundingBox & BoundingBox() const
TGLBoundingBox fBoundingBox
Also plays the role of ID.
Bool_t fDLCache
display-list validity bit-field
const Bool_t kTRUE
Definition: Rtypes.h:91
TObject * obj
TEvePlot3DGL()
Constructor.