File indexing completed on 2026-09-20 09:27:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TGLBoxPainter
0012 #define ROOT_TGLBoxPainter
0013
0014 #include <vector>
0015
0016 #include "TGLPlotPainter.h"
0017 #include "TGLQuadric.h"
0018 #include "TString.h"
0019 #include "TGLUtil.h"
0020
0021
0022
0023
0024
0025
0026 class TPolyMarker3D;
0027
0028 class TGLPlotCamera;
0029 class TAxis;
0030 class TH1;
0031
0032 class TGLBoxPainter : public TGLPlotPainter {
0033 private:
0034 TGLTH3Slice fXOZSlice;
0035 TGLTH3Slice fYOZSlice;
0036 TGLTH3Slice fXOYSlice;
0037
0038 enum EBoxType {
0039
0040 #if defined(__clang__) && __clang_major__ < 20
0041 #pragma clang diagnostic push
0042 #pragma clang diagnostic ignored "-Wshadow"
0043 #endif
0044 kBox,
0045 #if defined(__clang__) && __clang_major__ < 20
0046 #pragma clang diagnostic pop
0047 #endif
0048 kBox1
0049 };
0050
0051 mutable EBoxType fType;
0052
0053 TString fPlotInfo;
0054 Rgl::Range_t fMinMaxVal;
0055
0056 mutable TGLQuadric fQuadric;
0057
0058 const TPolyMarker3D *fPolymarker;
0059 std::vector<Double_t> fPMPoints;
0060
0061 TGLBoxPainter(const TGLBoxPainter &);
0062 TGLBoxPainter &operator = (const TGLBoxPainter &);
0063
0064 public:
0065 TGLBoxPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
0066
0067 TGLBoxPainter(TH1 *hist, TPolyMarker3D * pm,
0068 TGLPlotCamera *camera, TGLPlotCoordinates *coord);
0069
0070 char *GetPlotInfo(Int_t px, Int_t py) override;
0071 Bool_t InitGeometry() override;
0072 void StartPan(Int_t px, Int_t py) override;
0073 void Pan(Int_t px, Int_t py) override;
0074 void AddOption(const TString &stringOption) override;
0075 void ProcessEvent(Int_t event, Int_t px, Int_t py) override;
0076
0077 private:
0078
0079 void InitGL()const override;
0080 void DeInitGL()const override;
0081
0082 void DrawPlot()const override;
0083
0084 void DrawCloud()const;
0085
0086 void SetPlotColor()const;
0087
0088 void DrawSectionXOZ()const override;
0089 void DrawSectionYOZ()const override;
0090 void DrawSectionXOY()const override;
0091
0092 void DrawPalette()const;
0093 void DrawPaletteAxis()const override;
0094
0095 Bool_t HasSections()const;
0096
0097 ClassDefOverride(TGLBoxPainter, 0)
0098 };
0099
0100 #endif