forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TGLVoxelPainter.h
65 lines (46 loc) · 1.44 KB
/
TGLVoxelPainter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef ROOT_TGLVoxelPainter
#define ROOT_TGLVoxelPainter
#include <utility>
#include <vector>
#include "TGLPlotPainter.h"
#include "TGLQuadric.h"
#include "TString.h"
#include "TGLUtil.h"
class TGLOrthoCamera;
class TH1;
class TF1;
class TGLVoxelPainter : public TGLPlotPainter {
private:
TString fPlotInfo;
Rgl::Range_t fMinMaxVal;
TGLVoxelPainter(const TGLVoxelPainter &);
TGLVoxelPainter &operator = (const TGLVoxelPainter &);
mutable TGLLevelPalette fPalette;
mutable std::vector<Double_t> fLevels;
public:
TGLVoxelPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
char *GetPlotInfo(Int_t px, Int_t py);
Bool_t InitGeometry();
void StartPan(Int_t px, Int_t py);
void Pan(Int_t px, Int_t py);
void AddOption(const TString &stringOption);
void ProcessEvent(Int_t event, Int_t px, Int_t py);
private:
//Overriders
void InitGL()const;
void DeInitGL()const;
void DrawPlot()const;
void DrawSectionXOZ()const;
void DrawSectionYOZ()const;
void DrawSectionXOY()const;
void DrawPalette()const;
void DrawPaletteAxis()const;
//Aux. functions.
void FindVoxelColor(Double_t binContent, Float_t *rgba)const;
void SetVoxelColor(const Float_t *rgba)const;
Bool_t HasSections()const;
void PreparePalette()const;
TF1 *fTransferFunc;
ClassDef(TGLVoxelPainter, 0)//Voxel painter
};
#endif