Logo ROOT  
Reference Guide
TGLPlotPainter.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Timur Pocheptsov 14/06/2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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 
12 #ifndef ROOT_TGLPlotPainter
13 #define ROOT_TGLPlotPainter
14 
15 #include <vector>
16 
17 #include "TVirtualGL.h"
18 #include "TGLPlotBox.h"
19 #include "TPoint.h"
20 #include "TGLUtil.h"
21 #include "TNamed.h"
22 
23 class TGLPlotCoordinates;
24 class TGLPlotCamera;
25 class TGL5DDataSet;
26 class TString;
27 class TColor;
28 class TAxis;
29 class TH1;
30 class TH3;
31 class TF3;
32 
33 /*
34  Box cut. When attached to a plot, cuts away a part of it.
35  Can be moved in a plot's own area in X/Y/Z directions.
36 */
37 
38 class TGLBoxCut {
39 private:
47 
48  const TGLPlotBox * const fPlotBox;
51 
53 
54 public:
55  TGLBoxCut(const TGLPlotBox *plotBox);
56  virtual ~TGLBoxCut();
57 
58  void TurnOnOff();
59  Bool_t IsActive()const{return fActive;}
60  void SetActive(Bool_t a);
61 
62  void ResetBoxGeometry();
63 
65 
66  void DrawBox(Bool_t selectionPass, Int_t selected)const;
67 
68  void StartMovement(Int_t px, Int_t py);
69  void MoveBox(Int_t px, Int_t py, Int_t axisID);
70 
71  Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax,
72  Double_t zMin, Double_t zMax)const;
73 
74  template<class V>
75  Bool_t IsInCut(const V * v) const
76  {
77  //Check, if box defined by xmin/xmax etc. is in cut.
78  if (v[0] >= fXRange.first && v[0] < fXRange.second &&
79  v[1] >= fYRange.first && v[1] < fYRange.second &&
80  v[2] >= fZRange.first && v[2] < fZRange.second)
81  return kTRUE;
82  return kFALSE;
83  }
84 
85  Rgl::Range_t GetXRange()const{return fXRange;}
86  Rgl::Range_t GetYRange()const{return fYRange;}
87  Rgl::Range_t GetZRange()const{return fZRange;}
88 
89 private:
90  void AdjustBox();
91 
92  ClassDef(TGLBoxCut, 0)//Cuts away part of a plot.
93 };
94 
95 /*
96  2D contour for TH3 slicing.
97 */
98 
99 class TGLTH3Slice : public TNamed {
100 public:
102 
103 private:
105  const TAxis *fAxis;
107 
109  const TGLPlotBox *fBox;
111 
112  const TH3 *fHist;
113  const TF3 *fF3;
114 
116 
118 
119 public:
120  TGLTH3Slice(const TString &sliceName,
121  const TH3 *hist,
122  const TGLPlotCoordinates *coord,
123  const TGLPlotBox * box,
124  ESliceAxis axis);
125  TGLTH3Slice(const TString &sliceName,
126  const TH3 *hist, const TF3 *fun,
127  const TGLPlotCoordinates *coord,
128  const TGLPlotBox * box,
129  ESliceAxis axis);
130 
131  void DrawSlice(Double_t pos)const;
132  //SetSliceWidth must have "menu" comment.
133  void SetSliceWidth(Int_t width = 1); // *MENU*
134 
135  void SetMinMax(const Rgl::Range_t &newRange)
136  {
137  fMinMax = newRange;
138  }
139 
141  {
142  return fPalette;
143  }
144 
145 private:
146  void PrepareTexCoords(Double_t pos, Int_t sliceBegin, Int_t sliceEnd)const;
147  void FindMinMax(Int_t sliceBegin, Int_t sliceEnd)const;
148  Bool_t PreparePalette()const;
149  void DrawSliceTextured(Double_t pos)const;
150  void DrawSliceFrame(Int_t low, Int_t up)const;
151 
152  ClassDef(TGLTH3Slice, 0) // TH3 slice
153 };
154 
155 
156 /*
157  TGLPlotPainter class defines interface to different plot painters.
158 */
159 
160 class TGLPlotPainter;
161 
162 /*
163 Object of this class, created on stack in DrawPlot member-functions,
164 saves modelview matrix, moves plot to (0; 0; 0), and
165 restores modelview matrix in dtor.
166 */
167 
168 namespace Rgl {
169 
171 public:
172  PlotTranslation(const TGLPlotPainter *painter);
174 
175 private:
177 };
178 
179 }
180 
182  friend class Rgl::PlotTranslation;
183 private:
185 
186 protected:
188 
195 
199 
209 
210  std::vector<Double_t> fZLevels;
212 
216  };
217 
221 
222 public:
223 /* TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Int_t context,
224  Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable);
225  TGLPlotPainter(TGLPlotCamera *camera, Int_t context);*/
226  TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord,
227  Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable);
229  TGLPlotPainter(TGLPlotCamera *camera);
230 
231  const TGLPlotBox& RefBackBox() const { return fBackBox; }
232  void SetPhysicalShapeColor(const Float_t *rgba)
233  {
234  fPhysicalShapeColor = rgba;
235  }
236 
237  virtual void InitGL()const = 0;
238  virtual void DeInitGL()const = 0;
239  virtual void DrawPlot()const = 0;
240  virtual void Paint();
241 
242  //Checks, if mouse cursor is above plot.
243  virtual Bool_t PlotSelected(Int_t px, Int_t py);
244  //Init geometry does plot's specific initialization.
245  virtual Bool_t InitGeometry() = 0;
246 
247  virtual void StartPan(Int_t px, Int_t py) = 0;
248  //Pan function is already declared in TVirtualGLPainter.
249 
250  //Add string option, it can be a digit in "lego" or "surf".
251  virtual void AddOption(const TString &stringOption) = 0;
252  //Function to process additional events (key presses, mouse clicks.)
253  virtual void ProcessEvent(Int_t event, Int_t px, Int_t py) = 0;
254  //Used by GLpad
255  void SetPadColor(const TColor *color);
256 
257  virtual void SetFrameColor(const TColor *frameColor);
258  //Camera is external to painter, if zoom was changed, or camera
259  //was rotated, selection must be invalidated.
260  void InvalidateSelection();
261 
262  enum ECutAxisID {
263  kXAxis = 7,
264  kYAxis = 8,
265  kZAxis = 9
266  };
267 
268  Bool_t CutAxisSelected()const{return !fHighColor && fSelectedPart <= kZAxis && fSelectedPart >= kXAxis;}
269 
274 
275 protected:
276  const TColor *GetPadColor()const;
277  //
278  void MoveSection(Int_t px, Int_t py);
279  void DrawSections()const;
280  virtual void DrawSectionXOZ()const = 0;
281  virtual void DrawSectionYOZ()const = 0;
282  virtual void DrawSectionXOY()const = 0;
283 
284  virtual void DrawPaletteAxis()const;
285 
286  virtual void ClearBuffers()const;
287 
288  void PrintPlot()const;
289 
290  //Attention! After one of this methods was called,
291  //the GL_MATRIX_MODE could become different from what
292  //you had before the call: for example, SaveModelviewMatrix will
293  //change it to GL_MODELVIEW.
294  void SaveModelviewMatrix()const;
295  void SaveProjectionMatrix()const;
296 
297  void RestoreModelviewMatrix()const;
298  void RestoreProjectionMatrix()const;
299 
300  ClassDef(TGLPlotPainter, 0) //Base for gl plots
301 };
302 
303 /*
304  Auxiliary class, which holds different
305  information about plot's current coordinate system
306 */
307 
308 class TH2Poly;
309 
311 private:
313 
317 
321 
325 
329 
333 
336 
337 public:
339  virtual ~TGLPlotCoordinates();
340 
342  EGLCoordType GetCoordType()const;
343 
344  void SetXLog(Bool_t xLog);
345  Bool_t GetXLog()const;
346 
347  void SetYLog(Bool_t yLog);
348  Bool_t GetYLog()const;
349 
350  void SetZLog(Bool_t zLog);
351  Bool_t GetZLog()const;
352 
353  void ResetModified();
354  Bool_t Modified()const;
355  //
356  Bool_t SetRanges(const TH1 *hist, Bool_t errors = kFALSE, Bool_t zBins = kFALSE);
357  //
358  Bool_t SetRanges(TH2Poly *hist);
359  //
360  Bool_t SetRanges(const TAxis *xAxis, const TAxis *yAxis, const TAxis *zAxis);
361 
362  Int_t GetNXBins()const;
363  Int_t GetNYBins()const;
364  Int_t GetNZBins()const;
365 
366  const Rgl::BinRange_t &GetXBins()const;
367  const Rgl::BinRange_t &GetYBins()const;
368  const Rgl::BinRange_t &GetZBins()const;
369 
370  const Rgl::Range_t &GetXRange()const;
371  Double_t GetXLength()const;
372  const Rgl::Range_t &GetYRange()const;
373  Double_t GetYLength()const;
374  const Rgl::Range_t &GetZRange()const;
375  Double_t GetZLength()const;
376 
377  const Rgl::Range_t &GetXRangeScaled()const;
378  const Rgl::Range_t &GetYRangeScaled()const;
379  const Rgl::Range_t &GetZRangeScaled()const;
380 
381  Double_t GetXScale()const{return fXScale;}
382  Double_t GetYScale()const{return fYScale;}
383  Double_t GetZScale()const{return fZScale;}
384 
385  Int_t GetFirstXBin()const{return fXBins.first;}
386  Int_t GetLastXBin()const{return fXBins.second;}
387  Int_t GetFirstYBin()const{return fYBins.first;}
388  Int_t GetLastYBin()const{return fYBins.second;}
389  Int_t GetFirstZBin()const{return fZBins.first;}
390  Int_t GetLastZBin()const{return fZBins.second;}
391 
392  Double_t GetFactor()const;
393 
394 private:
395  Bool_t SetRangesPolar(const TH1 *hist);
396  Bool_t SetRangesCylindrical(const TH1 *hist);
397  Bool_t SetRangesSpherical(const TH1 *hist);
398 
399  Bool_t SetRangesCartesian(const TH1 *hist, Bool_t errors = kFALSE, Bool_t zBins = kFALSE);
400 
403 
404  ClassDef(TGLPlotCoordinates, 0)//Auxilary class, holds plot dimensions.
405 };
406 
407 class TGLLevelPalette;
408 
409 namespace Rgl {
410 
411 void DrawPalette(const TGLPlotCamera *camera, const TGLLevelPalette &palette);
412 void DrawPalette(const TGLPlotCamera *camera, const TGLLevelPalette &palette,
413  const std::vector<Double_t> &levels);
414 void DrawPaletteAxis(const TGLPlotCamera *camera, const Range_t &minMax, Bool_t logZ);
415 
416 //Polygonal histogram (TH2Poly) is slightly stretched along x and y.
417 extern const Double_t gH2PolyScaleXY;
418 
419 }
420 
421 #endif
TGLPlotPainter::fYOZSectionPos
Double_t fYOZSectionPos
Definition: TGLPlotPainter.h:205
TGLTH3Slice::kXOZ
@ kXOZ
Definition: TGLPlotPainter.h:101
TGLTH3Slice::GetPalette
const TGLLevelPalette & GetPalette() const
Definition: TGLPlotPainter.h:140
TGLTH3Slice::TGLTH3Slice
TGLTH3Slice(const TString &sliceName, const TH3 *hist, const TGLPlotCoordinates *coord, const TGLPlotBox *box, ESliceAxis axis)
Constructor.
Definition: TGLPlotPainter.cxx:1702
TAxis
Class to manage histogram axis.
Definition: TAxis.h:30
TGLPlotPainter::DrawPaletteAxis
virtual void DrawPaletteAxis() const
Draw. Palette. Axis.
Definition: TGLPlotPainter.cxx:582
TGLPlotCoordinates::fYRange
Rgl::Range_t fYRange
Definition: TGLPlotPainter.h:323
TGLPlotPainter::fBoxCut
TGLBoxCut fBoxCut
Definition: TGLPlotPainter.h:208
TGLPlotPainter::SetPhysicalShapeColor
void SetPhysicalShapeColor(const Float_t *rgba)
Definition: TGLPlotPainter.h:232
TGLPlotCoordinates::fCoordType
EGLCoordType fCoordType
Definition: TGLPlotPainter.h:312
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGLPlotCoordinates::ResetModified
void ResetModified()
Reset modified.
Definition: TGLPlotPainter.cxx:732
TGLPlotCoordinates::GetXLength
Double_t GetXLength() const
X length.
Definition: TGLPlotPainter.cxx:822
TGLPlotCoordinates::SetRangesSpherical
Bool_t SetRangesSpherical(const TH1 *hist)
Set ranges spherical.
Definition: TGLPlotPainter.cxx:1192
TGLPlotPainter::AddOption
virtual void AddOption(const TString &stringOption)=0
TGLPlotCoordinates::GetXRangeScaled
const Rgl::Range_t & GetXRangeScaled() const
Scaled range.
Definition: TGLPlotPainter.cxx:864
TGLPlotPainter
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms,...
Definition: TGLPlotPainter.h:181
f
#define f(i)
Definition: RSha256.hxx:104
TGLPlotPainter::InvalidateSelection
void InvalidateSelection()
Selection must be updated.
Definition: TGLPlotPainter.cxx:355
TGLPlotPainter::fCoord
TGLPlotCoordinates * fCoord
Definition: TGLPlotPainter.h:196
TGLPlotPainter::RestoreProjectionMatrix
void RestoreProjectionMatrix() const
Definition: TGLPlotPainter.cxx:612
TGLPlotCoordinates::GetNXBins
Int_t GetNXBins() const
Number of X bins.
Definition: TGLPlotPainter.cxx:766
TGLPlotPainter::DrawSectionXOZ
virtual void DrawSectionXOZ() const =0
TGLPlotPainter::CutAxisSelected
Bool_t CutAxisSelected() const
Definition: TGLPlotPainter.h:268
TGLPlotCoordinates::SetCoordType
void SetCoordType(EGLCoordType type)
If coord type was changed, plot must reset sections (if any), set fModified.
Definition: TGLPlotPainter.cxx:653
TGLPlotPainter::fSelectionPass
Bool_t fSelectionPass
Definition: TGLPlotPainter.h:201
TGLPlotPainter::TGLPlotPainter
TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable)
TGLPlotPainter's ctor.
Definition: TGLPlotPainter.cxx:50
TVirtualGLPainter
Definition: TVirtualGL.h:45
TGLPlotPainter::fSelectionBase
Int_t fSelectionBase
Definition: TGLPlotPainter.h:218
TGLPlotCoordinates::SetRanges
Bool_t SetRanges(const TH1 *hist, Bool_t errors=kFALSE, Bool_t zBins=kFALSE)
Set bin ranges, ranges.
Definition: TGLPlotPainter.cxx:748
TGLPlotPainter::fPadPhi
Double_t fPadPhi
Definition: TGLPlotPainter.h:189
TGLPlotPainter::SaveProjectionMatrix
void SaveProjectionMatrix() const
Definition: TGLPlotPainter.cxx:596
TGLBoxCut::fZRange
Rgl::Range_t fZRange
Definition: TGLPlotPainter.h:46
TGLPlotPainter::ProcessEvent
virtual void ProcessEvent(Int_t event, Int_t px, Int_t py)=0
TGLPlotPainter::ClearBuffers
virtual void ClearBuffers() const
Definition: TGLPlotPainter.cxx:567
TGLPlotCoordinates::fYScale
Double_t fYScale
Definition: TGLPlotPainter.h:319
TGLPlotCoordinates::fZRange
Rgl::Range_t fZRange
Definition: TGLPlotPainter.h:324
TGLLevelPalette
Definition: TGLUtil.h:1339
TGLPlotPainter::kXAxis
@ kXAxis
Definition: TGLPlotPainter.h:263
TGLPlotCoordinates::GetXScale
Double_t GetXScale() const
Definition: TGLPlotPainter.h:381
TNamed.h
TGLTH3Slice::FindMinMax
void FindMinMax(Int_t sliceBegin, Int_t sliceEnd) const
Find minimum and maximum for slice.
Definition: TGLPlotPainter.cxx:1790
TGLPlotPainter::fZLevels
std::vector< Double_t > fZLevels
Definition: TGLPlotPainter.h:210
TGLPlotCoordinates::fXBins
Rgl::BinRange_t fXBins
Definition: TGLPlotPainter.h:314
TGLBoxCut::IsInCut
Bool_t IsInCut(const V *v) const
Definition: TGLPlotPainter.h:75
Float_t
float Float_t
Definition: RtypesCore.h:57
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TGLBoxCut::GetXRange
Rgl::Range_t GetXRange() const
Definition: TGLPlotPainter.h:85
Int_t
int Int_t
Definition: RtypesCore.h:45
box
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
TGLTH3Slice::DrawSliceTextured
void DrawSliceTextured(Double_t pos) const
Draw slice textured.
Definition: TGLPlotPainter.cxx:1941
TGLPlotCoordinates::SetYLog
void SetYLog(Bool_t yLog)
If log changed, sections must be reset, set fModified.
Definition: TGLPlotPainter.cxx:693
TGLTH3Slice::kXOY
@ kXOY
Definition: TGLPlotPainter.h:101
TGLPlotPainter::fDrawAxes
Bool_t fDrawAxes
Definition: TGLPlotPainter.h:220
TGLPlotPainter::SetDrawAxes
void SetDrawAxes(Bool_t s)
Definition: TGLPlotPainter.h:272
TGLPlotCoordinates::fYRangeScaled
Rgl::Range_t fYRangeScaled
Definition: TGLPlotPainter.h:327
TGLPlotPainter::fBackBox
TGLPlotBox fBackBox
Definition: TGLPlotPainter.h:207
TGLPlotPainter::Paint
virtual void Paint()
Draw lego/surf/whatever you can.
Definition: TGLPlotPainter.cxx:150
TGLPlotPainter::ESelectionBase
ESelectionBase
Definition: TGLPlotPainter.h:213
TGLPlotPainter::fXAxis
TAxis * fXAxis
Definition: TGLPlotPainter.h:192
TGLBoxCut::IsInCut
Bool_t IsInCut(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax) const
Check, if box defined by xmin/xmax etc. is in cut.
Definition: TGLPlotPainter.cxx:1681
TGLPlotCoordinates::GetYScale
Double_t GetYScale() const
Definition: TGLPlotPainter.h:382
TGLTH3Slice::fTexCoords
TGL2DArray< Double_t > fTexCoords
Definition: TGLPlotPainter.h:115
TGLPlotPainter::SetFrameColor
virtual void SetFrameColor(const TColor *frameColor)
Set plot's back box color.
Definition: TGLPlotPainter.cxx:347
TGLPlotCoordinates::TGLPlotCoordinates
TGLPlotCoordinates()
Constructor.
Definition: TGLPlotPainter.cxx:629
TGLPlotPainter::fXOYSectionPos
Double_t fXOYSectionPos
Definition: TGLPlotPainter.h:206
TString
Basic string class.
Definition: TString.h:136
TGLPlotCoordinates::GetXBins
const Rgl::BinRange_t & GetXBins() const
X bins range.
Definition: TGLPlotPainter.cxx:790
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGLTH3Slice::PreparePalette
Bool_t PreparePalette() const
Initialize color palette.
Definition: TGLPlotPainter.cxx:1843
v
@ v
Definition: rootcling_impl.cxx:3635
TGLPlotCoordinates::GetLastZBin
Int_t GetLastZBin() const
Definition: TGLPlotPainter.h:390
b
#define b(i)
Definition: RSha256.hxx:100
TGLPlotCoordinates
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Definition: TGLPlotPainter.h:310
TGLPlotCoordinates::SetZLog
void SetZLog(Bool_t zLog)
If log changed, sections must be reset, set fModified.
Definition: TGLPlotPainter.cxx:713
TGLPlotPainter::DrawSectionXOY
virtual void DrawSectionXOY() const =0
bool
TGLPlotCoordinates::~TGLPlotCoordinates
virtual ~TGLPlotCoordinates()
Destructor.
Definition: TGLPlotPainter.cxx:645
TGLPlotCoordinates::GetXLog
Bool_t GetXLog() const
Get X log.
Definition: TGLPlotPainter.cxx:684
TGLPlotPainter::fYAxis
TAxis * fYAxis
Definition: TGLPlotPainter.h:193
TGLTH3Slice::fAxisType
ESliceAxis fAxisType
Definition: TGLPlotPainter.h:104
Rgl::Range_t
std::pair< Double_t, Double_t > Range_t
Definition: TGLUtil.h:1195
Rgl::PlotTranslation::fPainter
const TGLPlotPainter * fPainter
Definition: TGLPlotPainter.h:176
TGL2DArray< Double_t >
TGLBoxCut::fMousePos
TPoint fMousePos
Definition: TGLPlotPainter.h:52
TGLPlotCoordinates::SetRangesCylindrical
Bool_t SetRangesCylindrical(const TH1 *hist)
Set ranges cylindrical.
Definition: TGLPlotPainter.cxx:1139
TGLTH3Slice::fCoord
const TGLPlotCoordinates * fCoord
Definition: TGLPlotPainter.h:108
TGLTH3Slice::SetMinMax
void SetMinMax(const Rgl::Range_t &newRange)
Definition: TGLPlotPainter.h:135
TGLPlotCoordinates::GetZScale
Double_t GetZScale() const
Definition: TGLPlotPainter.h:383
TGLPlotCoordinates::fXLog
Bool_t fXLog
Definition: TGLPlotPainter.h:330
TGLPlotCoordinates::fModified
Bool_t fModified
Definition: TGLPlotPainter.h:334
TGLPlotPainter::fUpdateSelection
Bool_t fUpdateSelection
Definition: TGLPlotPainter.h:200
Rgl::PlotTranslation::PlotTranslation
PlotTranslation(const TGLPlotPainter *painter)
Definition: TGLPlotPainter.cxx:2086
TGLBoxCut::GetYRange
Rgl::Range_t GetYRange() const
Definition: TGLPlotPainter.h:86
TGLBoxCut::fFactor
Double_t fFactor
Definition: TGLPlotPainter.h:50
TGLPlotPainter::fHist
TH1 * fHist
Definition: TGLPlotPainter.h:191
TGLTH3Slice::ESliceAxis
ESliceAxis
Definition: TGLPlotPainter.h:101
TGLTH3Slice::fSliceWidth
Int_t fSliceWidth
Definition: TGLPlotPainter.h:110
TGL5DDataSet
Definition: TGL5D.h:28
TGLPlotPainter::InitGL
virtual void InitGL() const =0
TGLPlotCoordinates::GetNZBins
Int_t GetNZBins() const
Number of Z bins.
Definition: TGLPlotPainter.cxx:782
TGLBoxCut::fPlotBox
const TGLPlotBox *const fPlotBox
Definition: TGLPlotPainter.h:48
TGLPlotCoordinates::fXRangeScaled
Rgl::Range_t fXRangeScaled
Definition: TGLPlotPainter.h:326
TGLPlotPainter::fDrawPalette
Bool_t fDrawPalette
Definition: TGLPlotPainter.h:219
TGLPlotCoordinates::GetNYBins
Int_t GetNYBins() const
Number of Y bins.
Definition: TGLPlotPainter.cxx:774
TColor
The color creation and management class.
Definition: TColor.h:19
TGLPlotPainter::fCamera
TGLPlotCamera * fCamera
Definition: TGLPlotPainter.h:197
TGLPlotPainter::GetDrawAxes
Bool_t GetDrawAxes()
Definition: TGLPlotPainter.h:273
TH3
The 3-D histogram classes derived from the 1-D histogram classes.
Definition: TH3.h:31
TGLPlotPainter::SetDrawFrontBox
void SetDrawFrontBox(Bool_t b)
Definition: TGLPlotPainter.h:270
TGLBoxCut::DrawBox
void DrawBox(Bool_t selectionPass, Int_t selected) const
Draw cut as a semi-transparent box.
Definition: TGLPlotPainter.cxx:1509
TGLPlotPainter::DeInitGL
virtual void DeInitGL() const =0
TGLPlotPainter::SetPadColor
void SetPadColor(const TColor *color)
Used in a pad.
Definition: TGLPlotPainter.cxx:339
TGLTH3Slice::kYOZ
@ kYOZ
Definition: TGLPlotPainter.h:101
TGLBoxCut::GetZRange
Rgl::Range_t GetZRange() const
Definition: TGLPlotPainter.h:87
TGLTH3Slice::PrepareTexCoords
void PrepareTexCoords(Double_t pos, Int_t sliceBegin, Int_t sliceEnd) const
Prepare TexCoords.
Definition: TGLPlotPainter.cxx:1855
a
auto * a
Definition: textangle.C:12
TGLPlotCoordinates::GetZLog
Bool_t GetZLog() const
Get Z log.
Definition: TGLPlotPainter.cxx:724
TGLBoxCut::TurnOnOff
void TurnOnOff()
Turn the box cut on/off.
Definition: TGLPlotPainter.cxx:1451
TGLPlotCamera
Camera for TGLPlotPainter and sub-classes.
Definition: TGLPlotCamera.h:22
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TGLPlotCoordinates::GetFirstZBin
Int_t GetFirstZBin() const
Definition: TGLPlotPainter.h:389
TGLPlotCoordinates::GetFactor
Double_t GetFactor() const
Get factor.
Definition: TGLPlotPainter.cxx:888
Rgl::gH2PolyScaleXY
const Double_t gH2PolyScaleXY
Definition: TGLPlotPainter.cxx:2262
TGLTH3Slice::fPalette
TGLLevelPalette fPalette
Definition: TGLPlotPainter.h:106
TGLPlotCoordinates::fYBins
Rgl::BinRange_t fYBins
Definition: TGLPlotPainter.h:315
TGLBoxCut::fXLength
Double_t fXLength
Definition: TGLPlotPainter.h:40
TGLTH3Slice
A slice of a TH3.
Definition: TGLPlotPainter.h:99
TGLTH3Slice::fBox
const TGLPlotBox * fBox
Definition: TGLPlotPainter.h:109
TGLPlotPainter::fPadTheta
Double_t fPadTheta
Definition: TGLPlotPainter.h:190
EGLCoordType
EGLCoordType
Definition: TGLUtil.h:43
TGLBoxCut::SetFactor
void SetFactor(Double_t f)
Definition: TGLPlotPainter.h:64
TGLPlotPainter::fMousePosition
TPoint fMousePosition
Definition: TGLPlotPainter.h:203
TGLPlotCoordinates::fYLog
Bool_t fYLog
Definition: TGLPlotPainter.h:331
TF3
A 3-Dim function with parameters.
Definition: TF3.h:28
TGLTH3Slice::DrawSliceFrame
void DrawSliceFrame(Int_t low, Int_t up) const
Draw slice frame.
Definition: TGLPlotPainter.cxx:2055
TGLPlotCoordinates::GetYRange
const Rgl::Range_t & GetYRange() const
Y range.
Definition: TGLPlotPainter.cxx:830
TGLPlotCoordinates::GetCoordType
EGLCoordType GetCoordType() const
Get coordinates type.
Definition: TGLPlotPainter.cxx:664
TGLPlotPainter::kZAxis
@ kZAxis
Definition: TGLPlotPainter.h:265
TGLPlotCoordinates::GetYRangeScaled
const Rgl::Range_t & GetYRangeScaled() const
Scaled range.
Definition: TGLPlotPainter.cxx:872
TGLPlotCoordinates::fXRange
Rgl::Range_t fXRange
Definition: TGLPlotPainter.h:322
TGLTH3Slice::DrawSlice
void DrawSlice(Double_t pos) const
Draw slice.
Definition: TGLPlotPainter.cxx:1750
TGLPlotCoordinates::fZScale
Double_t fZScale
Definition: TGLPlotPainter.h:320
TGLBoxCut::fCenter
TGLVertex3 fCenter
Definition: TGLPlotPainter.h:43
TGLPlotPainter::kTrueColorSelectionBase
@ kTrueColorSelectionBase
Definition: TGLPlotPainter.h:215
TGLPlotCoordinates::GetYLog
Bool_t GetYLog() const
Get Y log.
Definition: TGLPlotPainter.cxx:704
TGLTH3Slice::SetSliceWidth
void SetSliceWidth(Int_t width=1)
Set Slice width.
Definition: TGLPlotPainter.cxx:1736
Rgl::DrawPaletteAxis
void DrawPaletteAxis(const TGLPlotCamera *camera, const Range_t &minMax, Bool_t logZ)
Definition: TGLPlotPainter.cxx:2222
TGLPlotPainter::fXOZSectionPos
Double_t fXOZSectionPos
Definition: TGLPlotPainter.h:204
TGLPlotPainter::RefBackBox
const TGLPlotBox & RefBackBox() const
Definition: TGLPlotPainter.h:231
TGLBoxCut::fYRange
Rgl::Range_t fYRange
Definition: TGLPlotPainter.h:45
TGLBoxCut::ResetBoxGeometry
void ResetBoxGeometry()
Set geometry using plot's back box.
Definition: TGLPlotPainter.cxx:1473
TGLPlotPainter::fSelection
TGLSelectionBuffer fSelection
Definition: TGLPlotPainter.h:198
TGLPlotPainter::fSelectedPart
Int_t fSelectedPart
Definition: TGLPlotPainter.h:202
TGLPlotCoordinates::SetRangesPolar
Bool_t SetRangesPolar(const TH1 *hist)
Set bin ranges, ranges, etc.
Definition: TGLPlotPainter.cxx:1084
Rgl::DrawPalette
void DrawPalette(const TGLPlotCamera *camera, const TGLLevelPalette &palette)
Draw. Palette.
Definition: TGLPlotPainter.cxx:2116
TGLPlotPainter::MoveSection
void MoveSection(Int_t px, Int_t py)
Create dynamic profile using selected plane.
Definition: TGLPlotPainter.cxx:371
TGLPlotCoordinates::GetYLength
Double_t GetYLength() const
Y length.
Definition: TGLPlotPainter.cxx:838
TGLPlotPainter::kHighColorSelectionBase
@ kHighColorSelectionBase
Definition: TGLPlotPainter.h:214
TGLPlotCoordinates::fZLog
Bool_t fZLog
Definition: TGLPlotPainter.h:332
TGLPlotCoordinates::GetZLength
Double_t GetZLength() const
Z length.
Definition: TGLPlotPainter.cxx:855
TGLTH3Slice::fHist
const TH3 * fHist
Definition: TGLPlotPainter.h:112
TGLBoxCut::StartMovement
void StartMovement(Int_t px, Int_t py)
Start cut's movement.
Definition: TGLPlotPainter.cxx:1579
TPoint
Definition: TPoint.h:31
Double_t
double Double_t
Definition: RtypesCore.h:59
TGLBoxCut::AdjustBox
void AdjustBox()
Box cut is limited by plot's sizes.
Definition: TGLPlotPainter.cxx:1651
TVirtualGL.h
TGLBoxCut
Used by plot-painters to determine the area of the plot that is cut away.
Definition: TGLPlotPainter.h:38
TGLSelectionBuffer
Definition: TGLUtil.h:1133
TGLPlotPainter::SetDrawBackBox
void SetDrawBackBox(Bool_t b)
Definition: TGLPlotPainter.h:271
TGLTH3Slice::fAxis
const TAxis * fAxis
Definition: TGLPlotPainter.h:105
TGLPlotCoordinates::SetXLog
void SetXLog(Bool_t xLog)
If log changed, sections must be reset, set fModified.
Definition: TGLPlotPainter.cxx:673
TGLPlotPainter::fPadColor
const TColor * fPadColor
Definition: TGLPlotPainter.h:184
TGLPlotBox::SetDrawFront
void SetDrawFront(Bool_t d)
Definition: TGLPlotBox.h:79
TGLPlotCoordinates::TGLPlotCoordinates
TGLPlotCoordinates(const TGLPlotCoordinates &)
TGLPlotCoordinates::SetRangesCartesian
Bool_t SetRangesCartesian(const TH1 *hist, Bool_t errors=kFALSE, Bool_t zBins=kFALSE)
Set bin ranges, ranges, etc.
Definition: TGLPlotPainter.cxx:907
Rgl
Definition: TVirtualGL.h:125
TGLPlotPainter::GetPadColor
const TColor * GetPadColor() const
Get pad color.
Definition: TGLPlotPainter.cxx:363
TGLPlotCoordinates::fXScale
Double_t fXScale
Definition: TGLPlotPainter.h:318
TGLBoxCut::SetActive
void SetActive(Bool_t a)
Turn the box cut on/off.
Definition: TGLPlotPainter.cxx:1463
TGLPlotCoordinates::GetFirstYBin
Int_t GetFirstYBin() const
Definition: TGLPlotPainter.h:387
TGLBoxCut::fActive
Bool_t fActive
Definition: TGLPlotPainter.h:49
Rgl::PlotTranslation
Definition: TGLPlotPainter.h:170
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGLPlotPainter::DrawSections
void DrawSections() const
Draw sections (if any).
Definition: TGLPlotPainter.cxx:443
TGLPlotPainter::DrawPlot
virtual void DrawPlot() const =0
TH1
TH1 is the base class of all histogramm classes in ROOT.
Definition: TH1.h:58
TGLPlotCoordinates::GetZRange
const Rgl::Range_t & GetZRange() const
Z range.
Definition: TGLPlotPainter.cxx:847
TGLPlotBox::SetDrawBack
void SetDrawBack(Bool_t d)
Definition: TGLPlotBox.h:82
TGLPlotCoordinates::operator=
TGLPlotCoordinates & operator=(const TGLPlotCoordinates &)
TGLPlotPainter::fHighColor
Bool_t fHighColor
Definition: TGLPlotPainter.h:211
TGLUtil.h
TGLPlotPainter::StartPan
virtual void StartPan(Int_t px, Int_t py)=0
TGLPlotPainter::fPhysicalShapeColor
const Float_t * fPhysicalShapeColor
Definition: TGLPlotPainter.h:187
TGLPlotCoordinates::GetZBins
const Rgl::BinRange_t & GetZBins() const
Z bins range.
Definition: TGLPlotPainter.cxx:806
TGLPlotPainter::kYAxis
@ kYAxis
Definition: TGLPlotPainter.h:264
TGLBoxCut::TGLBoxCut
TGLBoxCut(const TGLPlotBox *plotBox)
Constructor.
Definition: TGLPlotPainter.cxx:1430
TGLPlotCoordinates::Modified
Bool_t Modified() const
Modified.
Definition: TGLPlotPainter.cxx:740
TGLPlotCoordinates::GetFirstXBin
Int_t GetFirstXBin() const
Definition: TGLPlotPainter.h:385
TGLBoxCut::~TGLBoxCut
virtual ~TGLBoxCut()
Destructor.
Definition: TGLPlotPainter.cxx:1443
TGLBoxCut::fZLength
Double_t fZLength
Definition: TGLPlotPainter.h:42
Rgl::PlotTranslation::~PlotTranslation
~PlotTranslation()
Definition: TGLPlotPainter.cxx:2100
TGLPlotCoordinates::fZRangeScaled
Rgl::Range_t fZRangeScaled
Definition: TGLPlotPainter.h:328
TGLPlotPainter::fZAxis
TAxis * fZAxis
Definition: TGLPlotPainter.h:194
TH2Poly
2D Histogram with Polygonal Bins
Definition: TH2Poly.h:66
TGLPlotPainter::InitGeometry
virtual Bool_t InitGeometry()=0
TGLPlotCoordinates::GetYBins
const Rgl::BinRange_t & GetYBins() const
Y bins range.
Definition: TGLPlotPainter.cxx:798
TGLBoxCut::IsActive
Bool_t IsActive() const
Definition: TGLPlotPainter.h:59
TPoint.h
type
int type
Definition: TGX11.cxx:121
TGLPlotBox
Implementation of a box around a histogram/function for plot-painters.
Definition: TGLPlotBox.h:26
TGLBoxCut::fYLength
Double_t fYLength
Definition: TGLPlotPainter.h:41
TGLPlotPainter::ECutAxisID
ECutAxisID
Definition: TGLPlotPainter.h:262
TGLPlotCoordinates::GetZRangeScaled
const Rgl::Range_t & GetZRangeScaled() const
Scaled range.
Definition: TGLPlotPainter.cxx:880
TGLVertex3
3 component (x/y/z) vertex class.
Definition: TGLUtil.h:84
TGLPlotPainter::PlotSelected
virtual Bool_t PlotSelected(Int_t px, Int_t py)
Read color buffer content to find selected object.
Definition: TGLPlotPainter.cxx:274
TGLBoxCut::fXRange
Rgl::Range_t fXRange
Definition: TGLPlotPainter.h:44
TGLPlotCoordinates::GetLastXBin
Int_t GetLastXBin() const
Definition: TGLPlotPainter.h:386
TGLPlotPainter::DrawSectionYOZ
virtual void DrawSectionYOZ() const =0
TGLPlotCoordinates::fZBins
Rgl::BinRange_t fZBins
Definition: TGLPlotPainter.h:316
TGLTH3Slice::fMinMax
Rgl::Range_t fMinMax
Definition: TGLPlotPainter.h:117
TGLPlotPainter::PrintPlot
void PrintPlot() const
Generate PS using gl2ps.
Definition: TGLPlotPainter.cxx:232
TGLPlotCoordinates::GetXRange
const Rgl::Range_t & GetXRange() const
X range.
Definition: TGLPlotPainter.cxx:814
TGLPlotPainter::RestoreModelviewMatrix
void RestoreModelviewMatrix() const
Definition: TGLPlotPainter.cxx:604
TGLPlotCoordinates::fFactor
Double_t fFactor
Definition: TGLPlotPainter.h:335
TGLPlotCoordinates::GetLastYBin
Int_t GetLastYBin() const
Definition: TGLPlotPainter.h:388
TGLPlotPainter::SaveModelviewMatrix
void SaveModelviewMatrix() const
Definition: TGLPlotPainter.cxx:588
TGLPlotBox.h
int
Rgl::BinRange_t
std::pair< Int_t, Int_t > BinRange_t
Definition: TGLUtil.h:1194
TGLTH3Slice::fF3
const TF3 * fF3
Definition: TGLPlotPainter.h:113
TGLBoxCut::MoveBox
void MoveBox(Int_t px, Int_t py, Int_t axisID)
Move box cut along selected direction.
Definition: TGLPlotPainter.cxx:1588