Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
16 class TGLVoxelPainter : public TGLPlotPainter {
17 private:
18 
19  TString fPlotInfo;
20  Rgl::Range_t fMinMaxVal;
21 
22  TGLVoxelPainter(const TGLVoxelPainter &);
23  TGLVoxelPainter &operator = (const TGLVoxelPainter &);
24 
25  mutable TGLLevelPalette fPalette;
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);
32  Bool_t InitGeometry();
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 
60  TF1 *fTransferFunc;
61 
62  ClassDef(TGLVoxelPainter, 0)//Voxel painter
63 };
64 
65 #endif