TEvePlot3DGL.cxx

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEvePlot3DGL.cxx 36384 2010-10-20 14:26:41Z matevz $
00002 // Author: Matevz Tadel, 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "TEvePlot3DGL.h"
00013 #include "TEvePlot3D.h"
00014 #include "TGLPlot3D.h"
00015 
00016 #include "TGLRnrCtx.h"
00017 #include "TGLIncludes.h"
00018 
00019 //______________________________________________________________________________
00020 // OpenGL renderer class for TEvePlot3D.
00021 //
00022 
00023 ClassImp(TEvePlot3DGL);
00024 
00025 //______________________________________________________________________________
00026 TEvePlot3DGL::TEvePlot3DGL() :
00027    TGLObject(), fM(0), fPlotLogical(0)
00028 {
00029    // Constructor.
00030 
00031    fDLCache = kFALSE; // Disable display list.
00032 }
00033 
00034 /******************************************************************************/
00035 
00036 //______________________________________________________________________________
00037 Bool_t TEvePlot3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
00038 {
00039    // Set model object.
00040 
00041    fM = SetModelDynCast<TEvePlot3D>(obj);
00042    fPlotLogical = TGLPlot3D::CreatePlot(fM->fPlot, fM->fPlotOption, fM->fLogX, fM->fLogY, fM->fLogZ);
00043    return kTRUE;
00044 }
00045 
00046 //______________________________________________________________________________
00047 void TEvePlot3DGL::SetBBox()
00048 {
00049    // Set bounding box.
00050 
00051    // !! This ok if master sub-classed from TAttBBox
00052    //SetAxisAlignedBBox(((TEvePlot3D*)fExternalObj)->AssertBBox());
00053    fBoundingBox = fPlotLogical->BoundingBox();
00054 }
00055 
00056 /******************************************************************************/
00057 
00058 //______________________________________________________________________________
00059 void TEvePlot3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
00060 {
00061    // Render with OpenGL.
00062 
00063    // printf("TEvePlot3DGL::DirectDraw LOD %d\n", rnrCtx.CombiLOD());
00064    if (fPlotLogical)
00065    {
00066       fPlotLogical->DirectDraw(rnrCtx);
00067    }
00068 }

Generated on Tue Jul 5 14:16:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1