Logo ROOT   6.12/07
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 #include "TGLPlotPainter.h"
8 #include "TGLQuadric.h"
9 #include "TString.h"
10 #include "TGLUtil.h"
11 
12 class TGLOrthoCamera;
13 class TH1;
14 class TF1;
15 
17 private:
18 
21 
24 
26  mutable std::vector<Double_t> fLevels;
27 
28 public:
29  TGLVoxelPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
30 
31  char *GetPlotInfo(Int_t px, Int_t py);
33  void StartPan(Int_t px, Int_t py);
34  void Pan(Int_t px, Int_t py);
35  void AddOption(const TString &stringOption);
36  void ProcessEvent(Int_t event, Int_t px, Int_t py);
37 
38 private:
39  //Overriders
40  void InitGL()const;
41  void DeInitGL()const;
42 
43  void DrawPlot()const;
44 
45 
46  void DrawSectionXOZ()const;
47  void DrawSectionYOZ()const;
48  void DrawSectionXOY()const;
49 
50  void DrawPalette()const;
51  void DrawPaletteAxis()const;
52 
53  //Aux. functions.
54  void FindVoxelColor(Double_t binContent, Float_t *rgba)const;
55  void SetVoxelColor(const Float_t *rgba)const;
56 
57  Bool_t HasSections()const;
58  void PreparePalette()const;
59 
61 
62  ClassDef(TGLVoxelPainter, 0)//Voxel painter
63 };
64 
65 #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
void SetVoxelColor(const Float_t *rgba) const
Set box color.
float Float_t
Definition: RtypesCore.h:53
std::pair< Double_t, Double_t > Range_t
Definition: TGLUtil.h:1193
void DeInitGL() const
Return back some gl state variables.
Paint TH3 histograms as "voxels" - colored boxes, transparent if transfer function was specified...
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void DrawPalette() const
Draw. Palette.
void DrawSectionXOZ() const
Noop.
Rgl::Range_t fMinMaxVal
void Pan(Int_t px, Int_t py)
User&#39;s moving mouse cursor, with middle mouse button pressed (for pad).
TGLVoxelPainter(const TGLVoxelPainter &)
#define ClassDef(name, id)
Definition: Rtypes.h:320
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 PreparePalette() const
Generate palette.
void DrawSectionXOY() const
Noop.
void ProcessEvent(Int_t event, Int_t px, Int_t py)
Remove sections, switch on/off box cut.
void DrawSectionYOZ() const
Noop.
void DrawPlot() const
Draw "voxels".
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Bool_t HasSections() const
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms, functions and parametric surfaces.
double Double_t
Definition: RtypesCore.h:55
void InitGL() const
Initialize some gl state variables.
The TH1 histogram class.
Definition: TH1.h:56
Orthographic projection camera.
void DrawPaletteAxis() const
Draw. Palette. Axis.
1-Dim function class
Definition: TF1.h:211
Bool_t InitGeometry()
Set ranges, find min and max bin content.
void FindVoxelColor(Double_t binContent, Float_t *rgba) const
Find box color.
TGLLevelPalette fPalette