269 py =
gPad->GetWh() - py;
273 const Int_t glContext =
gPad->GetGLDevice();
275 if (glContext != -1) {
282 Error(
"DistancetoPrimitive",
283 "Attempt to use TGLHistPainter, while the current pad (gPad) does not support gl");
323 const Int_t glContext =
gPad->GetGLDevice();
325 if (glContext == -1) {
326 Error(
"ExecuteEvent",
327 "Attempt to use TGLHistPainter, while the current pad (gPad) does not support gl");
414 }
else if (event == 5 || py ==
kKey_K || py ==
kKey_k) {
455 static char errMsg[] = {
"TGLHistPainter::GetObjectInfo: Error in a hist painter\n" };
518 if (!std::strcmp(m,
"SetF3"))
558 struct TGLHistPainter::PlotOption_t {
603 if (glContext != -1) {
625 Bool_t FindAndRemoveOption(
TString &options,
const char *toFind)
627 const UInt_t len = std::strlen(toFind);
630 if (index !=
kNPOS) {
631 options.
Remove(index, len);
644 TGLHistPainter::PlotOption_t
655 if (FindAndRemoveOption(options,
"pol"))
657 if (FindAndRemoveOption(options,
"cyl"))
659 if (FindAndRemoveOption(options,
"sph"))
663 if (FindAndRemoveOption(options,
"lego"))
665 if (FindAndRemoveOption(options,
"surf"))
667 if (FindAndRemoveOption(options,
"tf3"))
669 if (FindAndRemoveOption(options,
"box"))
671 if (FindAndRemoveOption(options,
"iso"))
673 if (FindAndRemoveOption(options,
"col"))
677 if (FindAndRemoveOption(options,
"bb"))
678 parsedOption.fBackBox =
kFALSE;
679 if (FindAndRemoveOption(options,
"fb"))
680 parsedOption.fFrontBox =
kFALSE;
683 if (FindAndRemoveOption(options,
"a"))
684 parsedOption.fDrawAxes =
kFALSE;
701 if (dynamic_cast<TH2Poly*>(
fHist))
718 }
else if (option.fPlotType ==
kGLVoxel) {
731 fGLPainter->SetDrawFrontBox(option.fFrontBox);
764 vp.
X() =
Int_t(vp.
X() * scale);
765 vp.
Y() =
Int_t(vp.
Y() * scale);
void SetViewport(const TGLRect &vp)
Setup viewport, if it was changed, plus reset arcball.
void SetStack(TList *stack)
Set stack.
Plot-painter implementing LEGO rendering of TH2 histograms in cartesian, polar, cylindrical and spher...
void CreatePainter(const PlotOption_t &parsed, const TString &option)
Create painter.
PlotOption_t ParsePaintOption(const TString &option) const
In principle, we can have several conflicting options: "lego surf pol sph", surfbb: surf...
Bool_t IsInside(Int_t x, Int_t y)
Returns kTRUE if the cell ix, iy is inside one of the graphical cuts.
void SetHistogram(TH1 *hist)
Set histogram.
void DrawPanel()
Default implementation is OK This function is called from a context menu after right click on a plot'...
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Paint TH3 histograms as "voxels" - colored boxes, transparent if transfer function was specified...
Bool_t ViewportChanged() const
void ToLower()
Change string to lower-case.
char * GetObjectInfo(Int_t px, Int_t py) const
Overrides TObject::GetObjectInfo.
Implements painting of TH2 with "SURF" option.
Paints TH3 histograms by rendering variable-sized boxes matching the bin contents.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Selects plot or axis.
void Paint(Option_t *option)
Final-overrider for TObject::Paint.
TList * GetContourList(Double_t contour) const
Get contour list.
Plot-painter for TF3 functions.
std::unique_ptr< TGLPlotPainter > fGLPainter
Abstract interface to a histogram painter.
Viewport (pixel base) 2D rectangle class.
void SetYLog(Bool_t yLog)
If log changed, sections must be reset, set fModified.
TGLPlotCoordinates fCoord
void PadToViewport(Bool_t selectionPass=kFALSE)
void StartRotation(Int_t px, Int_t py)
User clicks somewhere (px, py).
std::unique_ptr< TVirtualHistPainter > fDefaultPainter
TGLParametricEquation * fEq
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
void ProcessMessage(const char *message, const TObject *obj)
Process message.
A 3-Dim function with parameters.
TGLHistPainter(TH1 *hist)
ROOT does not use exceptions, so, if default painter's creation failed, fDefaultPainter is 0...
void ResetModified()
Reset modified.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void SetXLog(Bool_t xLog)
If log changed, sections must be reset, set fModified.
A parametric surface is a surface defined by a parametric equation, involving two parameters (u...
TString & Remove(Ssiz_t pos)
void SetCoordType(EGLCoordType type)
If coord type was changed, plot must reset sections (if any), set fModified.
TGL5DPainter implements "gl5d" option for TTree::Draw.
void SetShowProjection(const char *option, Int_t nbins)
Set show projection.
The histogram painter class using OpenGL.
Mother of all ROOT objects.
void SetZLog(Bool_t zLog)
If log changed, sections must be reset, set fModified.
Int_t MakeCuts(char *cutsOpt)
Make cuts.
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute event.
TList * GetStack() const
Get stack.
void PaintStat(Int_t dostat, TF1 *fit)
Paint statistics.
const char * Data() const