// @(#)root/eve:$Id: TEveCaloLegoGL.h 24445 2008-06-20 18:55:43Z matevz $
// Author: Matevz Tadel 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEveCaloLegoGL
#define ROOT_TEveCaloLegoGL

#include "TGLObject.h"
#include "TEveCaloData.h"
#include "TGLIncludes.h"
#include "TGLAxisPainter.h"
#include <map>

class TEveCaloLego;

class TEveCaloLegoGL : public TGLObject
{
private:
   TEveCaloLegoGL(const TEveCaloLegoGL&);            // Not implemented
   TEveCaloLegoGL& operator=(const TEveCaloLegoGL&); // Not implemented

   // cached variables
   mutable Float_t   fDataMax;
   mutable Double_t  fZAxisStep;

   mutable TAxis*    fEtaAxis;
   mutable TAxis*    fPhiAxis;

   mutable TGLAxisAttrib    fXAxisAtt;
   mutable TGLAxisAttrib    fYAxisAtt;
   mutable TGLAxisAttrib    fZAxisAtt;

   mutable TGLAxisPainter   fAxisPainter;

protected:
   Int_t   GetGridStep(Int_t axId, TGLRnrCtx &rnrCtx) const;

   void    DrawZScales3D(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Float_t y0, Float_t y1) const;
   void    DrawZAxis(TGLRnrCtx &rnrCtx, Float_t azX, Float_t azY) const;

   void    DrawXYScales(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Float_t y0, Float_t y1) const;
   void    DrawHistBase(TGLRnrCtx &rnrCtx) const;

   void    DrawCells2D(TGLRnrCtx & rnrCtx) const;

   void    DrawCells3D(TGLRnrCtx & rnrCtx) const;
   void    MakeQuad(Float_t x, Float_t y, Float_t z,
                    Float_t xw, Float_t yw, Float_t zh) const;
   void    MakeDisplayList() const;

   mutable Bool_t                   fDLCacheOK;

   typedef std::map<Int_t, UInt_t>           SliceDLMap_t;
   typedef std::map<Int_t, UInt_t>::iterator SliceDLMap_i;

   mutable SliceDLMap_t     fDLMap;

   TEveCaloLego            *fM;  // Model object.

   // grid density modes
   Int_t                    fNBinSteps;
   Int_t*                   fBinSteps;

   // event handling
   Int_t                    fTowerPicked;

public:
   TEveCaloLegoGL();
   virtual ~TEveCaloLegoGL();

   void   SetTowerPicked(Int_t t) { fTowerPicked=t; }

   virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);

   virtual void   SetBBox();

   virtual void   DLCacheDrop();
   virtual void   DLCachePurge();

   virtual void   DirectDraw(TGLRnrCtx & rnrCtx) const;

   virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
   virtual void   ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);


   ClassDef(TEveCaloLegoGL, 0); // GL renderer class for TEveCaloLego.
};

#endif

Last change: Wed Jun 25 08:36:38 2008
Last generated: 2008-06-25 08:36

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.