12 #ifndef ROOT_TGLPlotPainter
13 #define ROOT_TGLPlotPainter
17 #ifndef ROOT_TVirtualGL
20 #ifndef ROOT_TGLPlotBox
88 if (v[0] >= fXRange.first && v[0] < fXRange.second &&
89 v[1] >= fYRange.first && v[1] < fYRange.second &&
90 v[2] >= fZRange.first && v[2] < fZRange.second)
136 const TH3 *hist,
const TF3 *fun,
244 fPhysicalShapeColor = rgba;
247 virtual void InitGL()
const = 0;
250 virtual void Paint();
423 const std::vector<Double_t> &levels);
void ResetBoxGeometry()
Set geometry using plot's back box.
Rgl::Range_t GetYRange() const
Camera for TGLPlotPainter and sub-classes.
virtual void DrawPaletteAxis() const
Draw. Palette. Axis.
Bool_t IsInCut(const V *v) const
PlotTranslation(const TGLPlotPainter *painter)
Int_t GetNXBins() const
Number of X bins.
const Rgl::Range_t & GetZRangeScaled() const
Scaled range.
void MoveBox(Int_t px, Int_t py, Int_t axisID)
Move box cut along selected direction.
const TGLLevelPalette & GetPalette() const
Bool_t PreparePalette() const
Initialize color palette.
void SetFactor(Double_t f)
Double_t GetXLength() const
X length.
std::pair< Double_t, Double_t > Range_t
Int_t GetLastXBin() const
virtual void ProcessEvent(Int_t event, Int_t px, Int_t py)=0
const Rgl::BinRange_t & GetXBins() const
X bins range.
const Rgl::Range_t & GetYRangeScaled() const
Scaled range.
Int_t GetFirstZBin() const
void TurnOnOff()
Turn the box cut on/off.
Rgl::Range_t fZRangeScaled
void AdjustBox()
Box cut is limited by plot's sizes.
void DrawPalette(const TGLPlotCamera *camera, const TGLLevelPalette &palette)
Draw. Palette.
void DrawPaletteAxis(const TGLPlotCamera *camera, const Range_t &minMax, Bool_t logZ)
Rgl::Range_t GetZRange() const
const TGLPlotCoordinates * fCoord
const Rgl::BinRange_t & GetZBins() const
Z bins range.
void SetMinMax(const Rgl::Range_t &newRange)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t GetZScale() const
Int_t GetFirstXBin() const
Bool_t SetRangesCartesian(const TH1 *hist, Bool_t errors=kFALSE, Bool_t zBins=kFALSE)
Set bin ranges, ranges, etc.
const Double_t gH2PolyScaleXY
virtual void ClearBuffers() const
Double_t GetZLength() const
Z length.
virtual void SetFrameColor(const TColor *frameColor)
Set plot's back box color.
TGLBoxCut(const TGLPlotBox *plotBox)
TGL2DArray< Double_t > fTexCoords
void SaveProjectionMatrix() const
#define ClassDef(name, id)
virtual ~TGLBoxCut()
Destructor.
The TNamed class is the base class for all named ROOT classes.
3 component (x/y/z) vertex class.
void SetDrawBack(Bool_t d)
void DrawSlice(Double_t pos) const
Draw slice.
TGLPlotCoordinates & operator=(const TGLPlotCoordinates &)
virtual Bool_t PlotSelected(Int_t px, Int_t py)
Read color buffer content to find selected object.
virtual void DrawSectionYOZ() const =0
const Rgl::Range_t & GetXRange() const
X range.
void SetDrawFront(Bool_t d)
void SetYLog(Bool_t yLog)
If log changed, sections must be reset, set fModified.
Implementation of a box around a histogram/function for plot-painters.
Bool_t SetRangesSpherical(const TH1 *hist)
Set ranges spherical.
Double_t GetXScale() const
The 3-D histogram classes derived from the 1-D histogram classes.
Int_t GetNZBins() const
Number of Z bins.
virtual void StartPan(Int_t px, Int_t py)=0
Bool_t GetZLog() const
Get Z log.
Bool_t SetRangesPolar(const TH1 *hist)
Set bin ranges, ranges, etc.
void RestoreProjectionMatrix() const
void SetDrawBackBox(Bool_t b)
const Rgl::BinRange_t & GetYBins() const
Y bins range.
Bool_t GetYLog() const
Get Y log.
void SetSliceWidth(Int_t width=1)
Set Slice width.
TGLPlotPainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable)
Class to manage histogram axis.
void DrawBox(Bool_t selectionPass, Int_t selected) const
Draw cut as a semi-transparent box.
A 3-Dim function with parameters.
Int_t GetLastZBin() const
std::pair< Int_t, Int_t > BinRange_t
virtual void DrawSectionXOY() const =0
void SetPadColor(const TColor *color)
Used in a pad.
void DrawSections() const
Draw sections (if any).
ClassDef(TVirtualGLPainter, 0)
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
void ResetModified()
Reset modified.
void SaveModelviewMatrix() const
Rgl::Range_t GetXRange() const
void SetXLog(Bool_t xLog)
If log changed, sections must be reset, set fModified.
TGLSelectionBuffer fSelection
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms, functions and parametric surfaces.
std::vector< Double_t > fZLevels
Rgl::Range_t fYRangeScaled
virtual void AddOption(const TString &stringOption)=0
void SetActive(Bool_t a)
Turn the box cut on/off.
void DrawSliceFrame(Int_t low, Int_t up) const
Draw slice frame.
void RestoreModelviewMatrix() const
void PrepareTexCoords(Double_t pos, Int_t sliceBegin, Int_t sliceEnd) const
Prepare TexCoords.
void SetDrawFrontBox(Bool_t b)
virtual Bool_t InitGeometry()=0
void SetCoordType(EGLCoordType type)
If coord type was changed, plot must reset sections (if any), set fModified.
Int_t GetFirstYBin() const
Int_t GetNYBins() const
Number of Y bins.
virtual void DrawSectionXOZ() const =0
The color creation and management class.
Bool_t SetRanges(const TH1 *hist, Bool_t errors=kFALSE, Bool_t zBins=kFALSE)
Set bin ranges, ranges.
virtual void DeInitGL() const =0
Double_t GetYLength() const
Y length.
Bool_t CutAxisSelected() const
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.
EGLCoordType GetCoordType() const
Get coordinates type.
Double_t GetFactor() const
Get factor.
const Rgl::Range_t & GetYRange() const
Y range.
void PrintPlot() const
Generate PS using gl2ps.
const Rgl::Range_t & GetXRangeScaled() const
Scaled range.
const Float_t * fPhysicalShapeColor
Bool_t GetXLog() const
Get X log.
Double_t GetYScale() const
void SetZLog(Bool_t zLog)
If log changed, sections must be reset, set fModified.
const TGLPlotPainter * fPainter
void StartMovement(Int_t px, Int_t py)
Start cut's movement.
void MoveSection(Int_t px, Int_t py)
Create dynamic profile using selected plane.
Rgl::Range_t fXRangeScaled
Bool_t Modified() const
Modified.
Int_t GetLastYBin() const
void FindMinMax(Int_t sliceBegin, Int_t sliceEnd) const
Find minimum and maximum for slice.
Bool_t SetRangesCylindrical(const TH1 *hist)
Set ranges cylindrical.
virtual void InitGL() const =0
TGLTH3Slice(const TString &sliceName, const TH3 *hist, const TGLPlotCoordinates *coord, const TGLPlotBox *box, ESliceAxis axis)
Used by plot-painters to determine the area of the plot that is cut away.
void DrawSliceTextured(Double_t pos) const
Draw slice textured.
TGLPlotCoordinates * fCoord
virtual void Paint()
Draw lego/surf/whatever you can.
virtual void DrawPlot() const =0
virtual ~TGLPlotCoordinates()
Destructor.
void InvalidateSelection()
Selection must be updated.
void SetPhysicalShapeColor(const Float_t *rgba)
const TColor * GetPadColor() const
Get pad color.
void SetDrawAxes(Bool_t s)
const TGLPlotBox *const fPlotBox
const TGLPlotBox & RefBackBox() const
const Rgl::Range_t & GetZRange() const
Z range.
2D Histogram with Polygonal Bins