Logo ROOT  
Reference Guide
No Matches
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 17/11/2005
5 * Copyright (C) 1995-2005, 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 *************************************************************************/
12#ifndef ROOT_TGLHistPainter
13#define ROOT_TGLHistPainter
15#include "TVirtualHistPainter.h"
16#include "TGLPlotPainter.h"
17#include "TGLPlotCamera.h"
19#include <memory>
22 TGLHistPainter is a proxy class. It inherits TVirtualHistPainter and
23 overrides its virtual functions, but all actual work is done by :
24 THistPainter - I name it "default" painter, it's the member of type
25 TVirtualHistPainter * and loaded via plugin-manager;
26 TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3);
27 TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/surf5);
28 TGLBoxPainter - box option for TH3;
29 TGLTF3Painter - TF3.
34class TGL5DDataSet;
35class TString;
36class TList;
37class TF3;
38class TH1;
42 //Dynamic type is THistPainter, no problems with simultaneous inheritance and membership
43 //TGLHistPainter delegates unsupported options/calls to this object
44 std::unique_ptr<TVirtualHistPainter> fDefaultPainter;
45 //This member can have different dynamic types: TGLLegoPainter, etc.
46 std::unique_ptr<TGLPlotPainter> fGLPainter;
57 TGLHistPainter(TH1 *hist);
62 //TVirtualHistPainter final overriders
63 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
64 void DrawPanel() override;
65 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
66 TList *GetContourList(Double_t contour)const override;
67 char *GetObjectInfo(Int_t px, Int_t py)const override;
68 TList *GetStack()const override;
69 Bool_t IsInside(Int_t x, Int_t y) override;
71 void Paint(Option_t *option) override;
72 void PaintStat(Int_t dostat, TF1 *fit) override;
73 void ProcessMessage(const char *message, const TObject *obj) override;
74 void SetHighlight() override;
75 void SetHistogram(TH1 *hist) override;
76 void SetStack(TList *stack) override;
77 Int_t MakeCuts(char *cutsOpt) override;
78 void SetShowProjection(const char *option, Int_t nbins) override;
79 void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) override;
84 struct PlotOption_t;
86 PlotOption_t ParsePaintOption(const TString &option)const;
87 void CreatePainter(const PlotOption_t &parsed,
88 const TString &option);
90 void PadToViewport(Bool_t selectionPass = kFALSE);
95 ClassDefOverride(TGLHistPainter, 0) //Proxy class for GL hist painters.
bool Bool_t
Definition RtypesCore.h:63
const Bool_t kFALSE
Definition RtypesCore.h:101
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Definition TGLUtil.h:51
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
1-Dim function class
Definition TF1.h:233
A 3-Dim function with parameters.
Definition TF3.h:28
The histogram painter class using OpenGL.
void SetHistogram(TH1 *hist) override
Set histogram.
void PaintStat(Int_t dostat, TF1 *fit) override
Paint statistics.
EGLPlotType fPlotType
TGLPlotCoordinates fCoord
void SetHighlight() override
Set highlight mode.
PlotOption_t ParsePaintOption(const TString &option) const
In principle, we can have several conflicting options: "lego surf pol sph", surfbb: surf,...
void CreatePainter(const PlotOption_t &parsed, const TString &option)
Create painter.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute event.
void ProcessMessage(const char *message, const TObject *obj) override
Process message.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Selects plot or axis.
void SetShowProjection(const char *option, Int_t nbins) override
Set show projection.
void PadToViewport(Bool_t selectionPass=kFALSE)
void SetStack(TList *stack) override
Set stack.
void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) override
Set show projectionXY.
TList * GetStack() const override
Get stack.
std::unique_ptr< TGLPlotPainter > fGLPainter
TGLHistPainter & operator=(const TGLHistPainter &)
TGLPlotPainter * GetRealPainter()
std::unique_ptr< TVirtualHistPainter > fDefaultPainter
TGLPlotCamera fCamera
void Paint(Option_t *option) override
Final-overrider for TObject::Paint.
void DrawPanel() override
Default implementation is OK This function is called from a context menu after right click on a plot'...
Int_t MakeCuts(char *cutsOpt) override
Make cuts.
TList * GetContourList(Double_t contour) const override
Get contour list.
TGLParametricEquation * fEq
TGLHistPainter(const TGLHistPainter &)
Bool_t IsInside(Int_t x, Int_t y) override
Returns kTRUE if the cell ix, iy is inside one of the graphical cuts.
char * GetObjectInfo(Int_t px, Int_t py) const override
Overrides TObject::GetObjectInfo.
A parametric surface is a surface defined by a parametric equation, involving two parameters (u,...
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,...
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
Abstract interface to a histogram painter.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17