ROOT  6.06/09
Reference Guide
TGLVoxelPainter.h
Go to the documentation of this file.
1 #ifndef ROOT_TGLVoxelPainter
2 #define ROOT_TGLVoxelPainter
3 
4 #include <utility>
5 #include <vector>
6 
7 #ifndef ROOT_TGLPlotPainter
8 #include "TGLPlotPainter.h"
9 #endif
10 #ifndef ROOT_TGLQuadric
11 #include "TGLQuadric.h"
12 #endif
13 #ifndef ROOT_TString
14 #include "TString.h"
15 #endif
16 #ifndef ROOT_TGLUtil
17 #include "TGLUtil.h"
18 #endif
19 
20 class TGLOrthoCamera;
21 class TH1;
22 class TF1;
23 
25 private:
26 
29 
32 
34  mutable std::vector<Double_t> fLevels;
35 
36 public:
37  TGLVoxelPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
38 
39  char *GetPlotInfo(Int_t px, Int_t py);
41  void StartPan(Int_t px, Int_t py);
42  void Pan(Int_t px, Int_t py);
43  void AddOption(const TString &stringOption);
44  void ProcessEvent(Int_t event, Int_t px, Int_t py);
45 
46 private:
47  //Overriders
48  void InitGL()const;
49  void DeInitGL()const;
50 
51  void DrawPlot()const;
52 
53 
54  void DrawSectionXOZ()const;
55  void DrawSectionYOZ()const;
56  void DrawSectionXOY()const;
57 
58  void DrawPalette()const;
59  void DrawPaletteAxis()const;
60 
61  //Aux. functions.
62  void FindVoxelColor(Double_t binContent, Float_t *rgba)const;
63  void SetVoxelColor(const Float_t *rgba)const;
64 
65  Bool_t HasSections()const;
66  void PreparePalette()const;
67 
69 
70  ClassDef(TGLVoxelPainter, 0)//Voxel painter
71 };
72 
73 #endif
void AddOption(const TString &stringOption)
"z" draw palette or not.
void StartPan(Int_t px, Int_t py)
User clicks right mouse button (in a pad).
Camera for TGLPlotPainter and sub-classes.
Definition: TGLPlotCamera.h:21
float Float_t
Definition: RtypesCore.h:53
std::pair< Double_t, Double_t > Range_t
Definition: TGLUtil.h:1197
void DrawPalette() const
Draw. Palette.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Rgl::Range_t fMinMaxVal
void Pan(Int_t px, Int_t py)
User's moving mouse cursor, with middle mouse button pressed (for pad).
void DrawSectionXOZ() const
Noop.
TGLVoxelPainter(const TGLVoxelPainter &)
std::vector< Double_t > fLevels
char * GetPlotInfo(Int_t px, Int_t py)
Show box info (i, j, k, binContent).
TGLVoxelPainter & operator=(const TGLVoxelPainter &)
void SetVoxelColor(const Float_t *rgba) const
Set box color.
void FindVoxelColor(Double_t binContent, Float_t *rgba) const
Find box color.
void ProcessEvent(Int_t event, Int_t px, Int_t py)
Remove sections, switch on/off box cut.
void DrawPaletteAxis() const
Draw. Palette. Axis.
Bool_t HasSections() const
ClassDef(TVirtualGLPainter, 0)
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms, functions and parametric surfaces.
void DrawSectionYOZ() const
Noop.
double Double_t
Definition: RtypesCore.h:55
void InitGL() const
Initialize some gl state variables.
The TH1 histogram class.
Definition: TH1.h:80
Orthographic projection camera.
void DrawPlot() const
Draw "voxels".
void DeInitGL() const
Return back some gl state variables.
1-Dim function class
Definition: TF1.h:149
Bool_t InitGeometry()
Set ranges, find min and max bin content.
void PreparePalette() const
Generate palette.
TGLLevelPalette fPalette
void DrawSectionXOY() const
Noop.