Logo ROOT   master
Reference Guide
TEveCalo3DGL.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
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 #ifndef ROOT_TEveCalo3DGL
13 #define ROOT_TEveCalo3DGL
14 
15 #include "TGLObject.h"
16 #include "TEveCaloData.h"
17 
18 class TEveCalo3D;
19 
20 class TEveCalo3DGL : public TGLObject
21 {
22 private:
23  TEveCalo3DGL(const TEveCalo3DGL&); // Not implemented
24  TEveCalo3DGL& operator=(const TEveCalo3DGL&); // Not implemented
25 
26  void CrossProduct(const Float_t a[3], const Float_t b[3], const Float_t c[3], Float_t out[3]) const;
27 
28  void RenderBox(const Float_t pnts[8]) const;
29  void RenderGridEndCap() const;
30  void RenderGridBarrel() const;
31  void RenderGrid(TGLRnrCtx & rnrCtx) const;
32  void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
33  void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
34 
36 
37 protected:
38  TEveCalo3D *fM; // Model object.
39 
40  mutable std::vector<Float_t> fOffset;
41 
42 public:
43  TEveCalo3DGL();
44  virtual ~TEveCalo3DGL() {}
45 
46  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
47  virtual void SetBBox();
48 
49  virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
50  virtual void DrawHighlight(TGLRnrCtx & rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const;
51 
52  virtual Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const;
53  virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
54  virtual Bool_t AlwaysSecondarySelect() const { return kTRUE; }
55  virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
56 
57  ClassDef(TEveCalo3DGL, 0); // GL renderer class for TEveCalo.
58 };
59 
60 #endif
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Override from TGLObject.
virtual Bool_t AlwaysSecondarySelect() const
Definition: TEveCalo3DGL.h:54
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
TEveCalo3DGL & operator=(const TEveCalo3DGL &)
TEveCalo3DGL()
Constructor.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
GL rendering.
float Float_t
Definition: RtypesCore.h:55
const char Option_t
Definition: RtypesCore.h:64
static constexpr double ps
int Int_t
Definition: RtypesCore.h:43
bool Bool_t
Definition: RtypesCore.h:61
void DrawSelectedCells(TEveCaloData::vCellId_t cells) const
Concrete physical shape - a GL drawable.
#define ClassDef(name, id)
Definition: Rtypes.h:322
void RenderGridEndCap() const
Render end cap grid.
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const
Draw polygons in highlight mode.
std::vector< Float_t > fOffset
Definition: TEveCalo3DGL.h:40
Base-class for direct OpenGL renderers.
Definition: TGLObject.h:21
std::vector< CellId_t > vCellId_t
Definition: TEveCaloData.h:146
virtual Bool_t SupportsSecondarySelect() const
Definition: TEveCalo3DGL.h:53
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
void CrossProduct(const Float_t a[3], const Float_t b[3], const Float_t c[3], Float_t out[3]) const
Calculate cross-product.
auto * a
Definition: textangle.C:12
Standard selection record including information about containing scene and details ob out selected ob...
OpenGL renderer class for TEveCalo3D.
Definition: TEveCalo3DGL.h:20
virtual void SetBBox()
Set bounding box.
Cell geometry inner structure.
Definition: TEveCaloData.h:72
void RenderGrid(TGLRnrCtx &rnrCtx) const
Draw frame reading eta, phi axis.
void RenderGridBarrel() const
Render barrel grid.
void RenderBox(const Float_t pnts[8]) const
Render box with given points.
Mother of all ROOT objects.
Definition: TObject.h:37
void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render barrel cell.
TEveCalo3D * fM
Definition: TEveCalo3DGL.h:38
void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render an endcap cell.
virtual ~TEveCalo3DGL()
Definition: TEveCalo3DGL.h:44
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
#define c(i)
Definition: RSha256.hxx:101
Visualization of a calorimeter event data in 3D.
Definition: TEveCalo.h:156
virtual void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec)
Processes tower selection.
const Bool_t kTRUE
Definition: RtypesCore.h:89