Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLBoxPainter.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 31/08/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TGLBoxPainter
12#define ROOT_TGLBoxPainter
13
14#include <vector>
15
16#include "TGLPlotPainter.h"
17#include "TGLQuadric.h"
18#include "TString.h"
19#include "TGLUtil.h"
20
21//TGLScenePad creates box painter
22//for the case TPad has poly marker and
23//empty TH3 inside.
24//Now it's up to box painter to do everything
25//correctly.
26class TPolyMarker3D;
27
28class TGLPlotCamera;
29class TAxis;
30class TH1;
31
33private:
37
38 enum EBoxType {
39 kBox, //boxes, sizes are proportional to bin content
40 kBox1 //spheres, not boxes
41 };
42
43 mutable EBoxType fType;
44
47
49
50 const TPolyMarker3D *fPolymarker; //Polymarker from TTree.
51 std::vector<Double_t> fPMPoints; //Cache for polymarker's points.
52
55
56public:
57 TGLBoxPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
58
60 TGLPlotCamera *camera, TGLPlotCoordinates *coord);
61
62 char *GetPlotInfo(Int_t px, Int_t py) override;
63 Bool_t InitGeometry() override;
64 void StartPan(Int_t px, Int_t py) override;
65 void Pan(Int_t px, Int_t py) override;
66 void AddOption(const TString &stringOption) override;
67 void ProcessEvent(Int_t event, Int_t px, Int_t py) override;
68
69private:
70 //Overriders
71 void InitGL()const override;
72 void DeInitGL()const override;
73
74 void DrawPlot()const override;
75 //Special type of TH3:
76 void DrawCloud()const;
77
78 void SetPlotColor()const;
79
80 void DrawSectionXOZ()const override;
81 void DrawSectionYOZ()const override;
82 void DrawSectionXOY()const override;
83
84 void DrawPalette()const;
85 void DrawPaletteAxis()const override;
86
87 Bool_t HasSections()const;
88
90};
91
92#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter char GetPlotInfo
Class to manage histogram axis.
Definition TAxis.h:31
Paints TH3 histograms by rendering variable-sized boxes matching the bin contents.
const TPolyMarker3D * fPolymarker
void DrawPlot() const override
TGLTH3Slice fYOZSlice
Bool_t HasSections() const
Check, if any section exists.
void DrawSectionYOZ() const override
Draw YOZ parallel section.
Bool_t InitGeometry() override
Set ranges, find min and max bin content.
void Pan(Int_t px, Int_t py) override
User's moving mouse cursor, with middle mouse button pressed (for pad).
TGLTH3Slice fXOZSlice
void DeInitGL() const override
Return back some gl state variables.
TGLBoxPainter & operator=(const TGLBoxPainter &)
void AddOption(const TString &stringOption) override
Box1 == spheres.
void DrawSectionXOZ() const override
Draw XOZ parallel section.
void InitGL() const override
Initialize some gl state variables.
TGLQuadric fQuadric
void StartPan(Int_t px, Int_t py) override
User clicks right mouse button (in a pad).
std::vector< Double_t > fPMPoints
TString fPlotInfo
Rgl::Range_t fMinMaxVal
void DrawPaletteAxis() const override
Draw. Palette. Axis.
void SetPlotColor() const
Set boxes color.
TGLBoxPainter(const TGLBoxPainter &)
void DrawCloud() const
Draw a frame and a polymarker inside.
void DrawSectionXOY() const override
Draw XOY parallel section.
void ProcessEvent(Int_t event, Int_t px, Int_t py) override
Remove sections.
TGLTH3Slice fXOYSlice
void DrawPalette() const
Draw.
Camera for TGLPlotPainter and sub-classes.
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms,...
Wrapper class for GLU quadric shape drawing object.
Definition TGLQuadric.h:28
A slice of a TH3.
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
A 3D polymarker.
Basic string class.
Definition TString.h:139
std::pair< Double_t, Double_t > Range_t
Definition TGLUtil.h:1202