Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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#include <vector>
18
19class TEveCalo3D;
20
21class TEveCalo3DGL : public TGLObject
22{
23private:
24 TEveCalo3DGL(const TEveCalo3DGL&) = delete;
26
27 void CrossProduct(const Float_t a[3], const Float_t b[3], const Float_t c[3], Float_t out[3]) const;
28
29 void RenderBox(const Float_t pnts[8]) const;
30 void RenderGridEndCap() const;
31 void RenderGridBarrel() const;
32 void RenderGrid(TGLRnrCtx & rnrCtx) const;
33 void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
34 void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t& offset) const;
35
37
38protected:
39 TEveCalo3D *fM; // Model object.
40
41 mutable std::vector<Float_t> fOffset;
42
43public:
45 ~TEveCalo3DGL() override {}
46
47 Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
48 void SetBBox() override;
49
50 void DirectDraw(TGLRnrCtx & rnrCtx) const override;
51 void DrawHighlight(TGLRnrCtx & rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const override;
52
53 Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const override;
54 Bool_t SupportsSecondarySelect() const override { return kTRUE; }
55 Bool_t AlwaysSecondarySelect() const override { return kTRUE; }
56 void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec) override;
57
58 ClassDefOverride(TEveCalo3DGL, 0); // GL renderer class for TEveCalo.
59};
60
61#endif
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
OpenGL renderer class for TEveCalo3D.
TEveCalo3DGL & operator=(const TEveCalo3DGL &)=delete
~TEveCalo3DGL() override
void SetBBox() override
Set bounding box.
std::vector< Float_t > fOffset
void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render barrel cell.
TEveCalo3D * fM
Bool_t SupportsSecondarySelect() const override
Bool_t AlwaysSecondarySelect() const override
void RenderBox(const Float_t pnts[8]) const
Render box with given points.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
GL rendering.
TEveCalo3DGL()
Constructor.
void RenderGrid(TGLRnrCtx &rnrCtx) const
Draw frame reading eta, phi axis.
void RenderGridEndCap() const
Render end cap grid.
void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec) override
Processes tower selection.
TEveCalo3DGL(const TEveCalo3DGL &)=delete
void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const override
Draw polygons in highlight mode.
void DrawSelectedCells(TEveCaloData::vCellId_t cells) const
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.
Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const override
Override from TGLObject.
void RenderGridBarrel() const
Render barrel grid.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render an endcap cell.
Visualization of a calorimeter event data in 3D.
Definition TEveCalo.h:158
std::vector< CellId_t > vCellId_t
Base-class for direct OpenGL renderers.
Definition TGLObject.h:22
Concrete physical shape - a GL drawable.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition TGLRnrCtx.h:41
Standard selection record including information about containing scene and details ob out selected ob...
Mother of all ROOT objects.
Definition TObject.h:41
Cell geometry inner structure.