Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:02

0001 #ifndef ROOT_TGLVoxelPainter
0002 #define ROOT_TGLVoxelPainter
0003 
0004 #include <vector>
0005 
0006 #include "TGLPlotPainter.h"
0007 #include "TGLQuadric.h"
0008 #include "TString.h"
0009 #include "TGLUtil.h"
0010 
0011 class TGLOrthoCamera;
0012 class TH1;
0013 class TF1;
0014 
0015 class TGLVoxelPainter : public TGLPlotPainter {
0016 private:
0017 
0018    TString                 fPlotInfo;
0019    Rgl::Range_t            fMinMaxVal;
0020 
0021    TGLVoxelPainter(const TGLVoxelPainter &) = delete;
0022    TGLVoxelPainter &operator = (const TGLVoxelPainter &) = delete;
0023 
0024    mutable TGLLevelPalette fPalette;
0025    mutable std::vector<Double_t> fLevels;
0026 
0027 public:
0028    TGLVoxelPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
0029 
0030    char   *GetPlotInfo(Int_t px, Int_t py) override;
0031    Bool_t  InitGeometry() override;
0032    void    StartPan(Int_t px, Int_t py) override;
0033    void    Pan(Int_t px, Int_t py) override;
0034    void    AddOption(const TString &stringOption) override;
0035    void    ProcessEvent(Int_t event, Int_t px, Int_t py) override;
0036 
0037 private:
0038    //Overriders
0039    void    InitGL()const override;
0040    void    DeInitGL()const override;
0041 
0042    void    DrawPlot()const override;
0043 
0044 
0045    void    DrawSectionXOZ()const override;
0046    void    DrawSectionYOZ()const override;
0047    void    DrawSectionXOY()const override;
0048 
0049    void    DrawPalette()const;
0050    void    DrawPaletteAxis()const override;
0051 
0052    //Aux. functions.
0053    void    FindVoxelColor(Double_t binContent, Float_t *rgba)const;
0054    void    SetVoxelColor(const Float_t *rgba)const;
0055 
0056    Bool_t  HasSections()const;
0057    void    PreparePalette()const;
0058 
0059    TF1    *fTransferFunc;
0060 
0061    ClassDefOverride(TGLVoxelPainter, 0)//Voxel painter
0062 };
0063 
0064 #endif