TEveCalo3DGL.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveCalo3DGL.h 35074 2010-08-30 15:18:02Z matevz $
00002 // Author: Matevz Tadel 2007
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 #ifndef ROOT_TEveCalo3DGL
00013 #define ROOT_TEveCalo3DGL
00014 
00015 #include "TGLObject.h"
00016 #include "TEveCaloData.h"
00017 
00018 class TEveCalo3D;
00019 
00020 class TEveCalo3DGL : public TGLObject
00021 {
00022 private:
00023    TEveCalo3DGL(const TEveCalo3DGL&);            // Not implemented
00024    TEveCalo3DGL& operator=(const TEveCalo3DGL&); // Not implemented
00025 
00026    void    CrossProduct(const Float_t a[3], const Float_t b[3], const Float_t c[3], Float_t out[3]) const;
00027 
00028    void    RenderBox(const Float_t pnts[8]) const;
00029    void    RenderGridEndCap() const;
00030    void    RenderGridBarrel() const;
00031    void    RenderGrid(TGLRnrCtx & rnrCtx) const;
00032    void    RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
00033    void    RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
00034 
00035    void    DrawSelectedCells(TEveCaloData::vCellId_t cells) const;
00036 
00037 protected:
00038    TEveCalo3D     *fM;  // Model object.
00039 
00040    mutable std::vector<Float_t>     fOffset;
00041 
00042 public:
00043    TEveCalo3DGL();
00044    virtual ~TEveCalo3DGL() {}
00045 
00046    virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
00047    virtual void   SetBBox();
00048 
00049    virtual void   DirectDraw(TGLRnrCtx & rnrCtx) const;
00050    virtual void   DrawHighlight(TGLRnrCtx & rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const;
00051 
00052    virtual Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const;
00053    virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
00054    virtual Bool_t AlwaysSecondarySelect()   const { return kTRUE; }
00055    virtual void   ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
00056 
00057    ClassDef(TEveCalo3DGL, 0); // GL renderer class for TEveCalo.
00058 };
00059 
00060 #endif

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