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