32#include "TGLIncludes.h"
53 fPhysicalShapeColor(0),
57 fXAxis(hist->GetXaxis()),
58 fYAxis(hist->GetYaxis()),
59 fZAxis(hist->GetZaxis()),
62 fUpdateSelection(
kTRUE),
68 fBackBox(xoy, xoz, yoz),
71 fSelectionBase(kTrueColorSelectionBase),
86 fPhysicalShapeColor(0),
90 fXAxis(data->GetXAxis()),
91 fYAxis(data->GetYAxis()),
92 fZAxis(data->GetZAxis()),
95 fUpdateSelection(
kTRUE),
104 fSelectionBase(kTrueColorSelectionBase),
119 fPhysicalShapeColor(0),
128 fUpdateSelection(
kTRUE),
137 fSelectionBase(kTrueColorSelectionBase),
158 glGetIntegerv(GL_VIEWPORT, vp);
166 glPushAttrib(GL_LIGHTING_BIT);
175 glClear(GL_DEPTH_BUFFER_BIT);
177 const Float_t pos[] = {0.f, 0.f, 0.f, 1.f};
178 glLightfv(GL_LIGHT0, GL_POSITION, pos);
196 glViewport(vp[0], vp[1], vp[2], vp[3]);
240 Error(
"TGLPlotPainter::PrintPlot",
"Could not (re)open ps file for GL output");
246 Int_t gl2psFormat = GL2PS_EPS;
247 Int_t gl2psSort = GL2PS_BSP_SORT;
249 Int_t state = GL2PS_OVERFLOW;
250 GLint gl2psoption = GL2PS_USE_CURRENT_VIEWPORT |
253 GL2PS_OCCLUSION_CULL |
256 while (state == GL2PS_OVERFLOW) {
257 buffsize += 1024*1024;
258 gl2psBeginPage (
"ROOT Scene Graph",
"ROOT", NULL,
259 gl2psFormat, gl2psSort, gl2psoption,
260 GL_RGBA, 0, NULL,0, 0, 0,
263 state = gl2psEndPage();
278 glMatrixMode(GL_PROJECTION);
280 glMatrixMode(GL_MODELVIEW);
287 glClearColor(0.f, 0.f, 0.f, 0.f);
288 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
301 glDisable(GL_DEPTH_TEST);
304 glMatrixMode(GL_PROJECTION);
306 glMatrixMode(GL_MODELVIEW);
382 if (frontPoint == 2) {
385 }
else if (!frontPoint) {
388 }
else if (frontPoint == 1) {
391 }
else if (frontPoint == 3) {
396 if (frontPoint == 2) {
399 }
else if (!frontPoint) {
402 }
else if (frontPoint == 1) {
405 }
else if (frontPoint == 3) {
412 glGetDoublev(GL_MODELVIEW_MATRIX, mv);
414 glGetDoublev(GL_PROJECTION_MATRIX, pr);
416 glGetIntegerv(GL_VIEWPORT, vp);
420 gluProject(0., 0.,
fXOYSectionPos, mv, pr, vp, &winVertex[0], &winVertex[1], &winVertex[2]);
425 &winVertex[0], &winVertex[1], &winVertex[2]);
429 gluUnProject(winVertex[0], winVertex[1], winVertex[2], mv, pr, vp,
430 newPoint, newPoint + 1, newPoint + 2);
460 glEnable(GL_POLYGON_OFFSET_FILL);
461 glPolygonOffset(1.f, 1.f);
463 glDisable(GL_POLYGON_OFFSET_FILL);
471 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
477 glLineStipple(1, stipple);
479 glColor3d(0., 0., 0.);
503 glEnable(GL_POLYGON_OFFSET_FILL);
504 glPolygonOffset(1.f, 1.f);
506 glDisable(GL_POLYGON_OFFSET_FILL);
514 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
519 glLineStipple(1, 0x5555);
521 glColor3d(0., 0., 0.);
545 glEnable(GL_POLYGON_OFFSET_FILL);
546 glPolygonOffset(1.f, 1.f);
549 glDisable(GL_POLYGON_OFFSET_FILL);
557 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
590 glMatrixMode(GL_MODELVIEW);
598 glMatrixMode(GL_PROJECTION);
606 glMatrixMode(GL_MODELVIEW);
614 glMatrixMode(GL_PROJECTION);
911 if (!FindAxisRange(hist->
GetXaxis(),
fXLog, xBins, xRange)) {
912 Error(
"TGLPlotCoordinates::SetRangesCartesian",
"Cannot set X axis to log scale");
918 if (!FindAxisRange(hist->
GetYaxis(),
fYLog, yBins, yRange)) {
919 Error(
"TGLPlotCoordinates::SetRangesCartesian",
"Cannot set Y axis to log scale");
928 if (!FindAxisRange(hist->
GetZaxis(),
fZLog, zBins, zRange)) {
929 Error(
"TGLPlotCoordinates::SetRangesCartesian",
"Cannot set Z axis to log scale");
932 }
else if (!FindAxisRange(hist,
fZLog, xBins, yBins, zRange, factor, errors)) {
933 Error(
"TGLPlotCoordinates::SetRangesCartesian",
934 "Log scale is requested for Z, but maximum less or equal 0. (%f)", zRange.second);
939 const Double_t x = xRange.second - xRange.first;
940 const Double_t y = yRange.second - yRange.first;
941 const Double_t z = zRange.second - zRange.first;
943 if (!
x || !
y || !z) {
944 Error(
"TGLPlotCoordinates::SetRangesCartesian",
"Zero axis range.");
991 if (!FindAxisRange(hist,
fZLog, zRange))
995 const Double_t x = xRange.second - xRange.first;
996 const Double_t y = yRange.second - yRange.first;
997 const Double_t z = zRange.second - zRange.first;
999 if (!
x || !
y || !z) {
1000 Error(
"TGLPlotCoordinates::SetRanges",
"Zero axis range.");
1033 FindAxisRange(xAxis,
kFALSE, xBins, xRange);
1038 FindAxisRange(yAxis,
kFALSE, yBins, yRange);
1044 FindAxisRange(zAxis,
kFALSE, zBins, zRange);
1047 const Double_t x = xRange.second - xRange.first;
1048 const Double_t y = yRange.second - yRange.first;
1049 const Double_t z = zRange.second - zRange.first;
1051 if (!
x || !
y || !z) {
1052 Error(
"TGLPlotCoordinates::SetRangesCartesian",
"Zero axis range.");
1089 FindAxisRange(xAxis,
kFALSE, xBins, phiRange);
1090 if (xBins.second - xBins.first + 1 > 360) {
1091 Error(
"TGLPlotCoordinates::SetRangesPolar",
"To many PHI sectors");
1098 FindAxisRange(yAxis,
kFALSE, yBins, roRange);
1102 if (!FindAxisRange(hist,
fZLog, xBins, yBins, zRange, factor,
kFALSE))
1104 Error(
"TGLPlotCoordinates::SetRangesPolar",
1105 "Log scale is requested for Z, but maximum less or equal 0. (%f)", zRange.second);
1109 const Double_t z = zRange.second - zRange.first;
1110 if (!z || !(phiRange.second - phiRange.first) || !(roRange.second - roRange.first)) {
1111 Error(
"TGLPlotCoordinates::SetRangesPolar",
"Zero axis range.");
1147 FindAxisRange(xAxis,
kFALSE, xBins, angleRange);
1148 if (xBins.second - xBins.first + 1 > 360) {
1149 Error(
"TGLPlotCoordinates::SetRangesCylindrical",
"To many PHI sectors");
1152 if (!FindAxisRange(yAxis,
fYLog, yBins, heightRange)) {
1153 Error(
"TGLPlotCoordinates::SetRangesCylindrical",
"Cannot set Y axis to log scale");
1156 FindAxisRange(hist,
kFALSE, xBins, yBins, radiusRange, factor,
kFALSE);
1158 const Double_t x = angleRange.second - angleRange.first;
1159 const Double_t y = heightRange.second - heightRange.first;
1160 const Double_t z = radiusRange.second - radiusRange.first;
1162 if (!
x || !
y || !z) {
1163 Error(
"TGLPlotCoordinates::SetRangesCylindrical",
"Zero axis range.");
1197 if (xBins.second - xBins.first + 1 > 360) {
1198 Error(
"TGLPlotCoordinates::SetRangesSpherical",
"To many PHI sectors");
1205 if (yBins.second - yBins.first + 1 > 180) {
1206 Error(
"TGLPlotCoordinates::SetRangesSpherical",
"To many THETA sectors");
1212 FindAxisRange(hist,
kFALSE, xBins, yBins, radiusRange, factor,
kFALSE);
1252 for (
const Int_t lastBin = axis->
GetLast(); currBin <= lastBin; ++currBin)
1275 if (range.second <= 0.)
1280 if (range.first <= 0.) {
1283 if (bin > bins.second)
1288 if (bin > bins.second)
1313 zRange.second = hist->
GetBinContent(hist->
GetBin(xBins.first, yBins.first)), zRange.first = zRange.second;
1316 for (
Int_t i = xBins.first; i <= xBins.second; ++i) {
1317 for (
Int_t j = yBins.first; j <= yBins.second; ++j) {
1319 if (val > 0. && errors)
1321 zRange.second =
TMath::Max(val, zRange.second);
1322 zRange.first =
TMath::Min(val, zRange.first);
1332 if (logZ && zRange.second <= 0.)
1335 if (zRange.first >= zRange.second)
1336 zRange.first = 0.001 * zRange.second;
1339 if (summ) factor /= summ;
1340 if (!factor) factor = 1.;
1342 Warning(
"TGLPlotPainter::ExtractAxisZInfo",
1343 "Negative factor, negative ranges - possible incorrect behavior");
1345 zRange.second *= factor;
1346 zRange.first *= factor;
1349 if (zRange.first <= 0.)
1350 zRange.first =
TMath::Min(1., 0.001 * zRange.second);
1361 zRange.second += margin * (zRange.second - zRange.first);
1364 zRange.first >= 0 ? zRange.first = 0. : zRange.
first -= margin * (zRange.second - zRange.
first);
1366 zRange.first >= 0 && zRange.first - margin * (zRange.second - zRange.first) <= 0 ?
1367 zRange.first = 0 : zRange.
first -= margin * (zRange.second - zRange.
first);
1380 Error(
"FindAxisRange",
"TH2Poly returned empty list of bins");
1387 if (zRange.first >= zRange.second)
1388 zRange.first = 0.001 * zRange.second;
1391 if (zRange.second < 1
e-20) {
1392 Error(
"FindAxisRange",
"Failed to switch Z axis to logarithmic scale");
1396 if (zRange.first <= 0.)
1397 zRange.first =
TMath::Min(1., 0.001 * zRange.second);
1408 zRange.second += margin * (zRange.second - zRange.first);
1410 zRange.first >= 0 ? zRange.first = 0. : zRange.
first -= margin * (zRange.second - zRange.
first);
1412 zRange.first >= 0 && zRange.first - margin * (zRange.second - zRange.first) <= 0 ?
1413 zRange.first = 0 : zRange.
first -= margin * (zRange.second - zRange.
first);
1478 (
box[0].Z() +
box[4].Z()) / 2);
1511 if (!selectionPass) {
1512 glDisable(GL_LIGHTING);
1534 glEnable(GL_LIGHTING);
1537 glGetBooleanv(GL_BLEND, &oldBlendState);
1542 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1545 const Float_t diffuseColor[] = {0.f, 0.f, 1.f, 0.1f};
1546 glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuseColor);
1552 glDisable(GL_BLEND);
1591 glGetDoublev(GL_MODELVIEW_MATRIX, mv);
1593 glGetDoublev(GL_PROJECTION_MATRIX, pr);
1595 glGetIntegerv(GL_VIEWPORT, vp);
1600 gluProject(
fCenter.
X(), 0., 0., mv, pr, vp, &winVertex[0], &winVertex[1], &winVertex[2]);
1603 gluProject(0.,
fCenter.
Y(), 0., mv, pr, vp, &winVertex[0], &winVertex[1], &winVertex[2]);
1606 gluProject(0., 0.,
fCenter.
Z(), mv, pr, vp, &winVertex[0], &winVertex[1], &winVertex[2]);
1613 gluUnProject(winVertex[0], winVertex[1], winVertex[2], mv, pr, vp,
1614 newPoint, newPoint + 1, newPoint + 2);
1761 Int_t low = 1, up = 2;
1866 for (
Int_t level = low; level < up; ++ level)
1891 for (
Int_t level = low; level < up; ++ level)
1916 for (
Int_t level = low; level < up; ++ level)
1961 glVertex3d(xMin, pos, zMin);
1963 glVertex3d(xMin, pos, zMax);
1965 glVertex3d(xMax, pos, zMax);
1967 glVertex3d(xMax, pos, zMin);
1982 glVertex3d(pos, yMin, zMin);
1984 glVertex3d(pos, yMax, zMin);
1986 glVertex3d(pos, yMax, zMax);
1988 glVertex3d(pos, yMin, zMax);
2003 glVertex3d(xMax, yMin, pos);
2005 glVertex3d(xMax, yMax, pos);
2007 glVertex3d(xMin, yMax, pos);
2009 glVertex3d(xMin, yMin, pos);
2025 glVertex3d(xMin, yMin, zMin);
2026 glVertex3d(xMax, yMin, zMin);
2027 glVertex3d(xMax, yMax, zMin);
2028 glVertex3d(xMin, yMax, zMin);
2032 glVertex3d(xMin, yMin, zMax);
2033 glVertex3d(xMax, yMin, zMax);
2034 glVertex3d(xMax, yMax, zMax);
2035 glVertex3d(xMin, yMax, zMax);
2039 glVertex3d(xMin, yMin, zMin);
2040 glVertex3d(xMin, yMin, zMax);
2041 glVertex3d(xMax, yMin, zMin);
2042 glVertex3d(xMax, yMin, zMax);
2043 glVertex3d(xMax, yMax, zMin);
2044 glVertex3d(xMax, yMax, zMax);
2045 glVertex3d(xMin, yMax, zMin);
2046 glVertex3d(xMin, yMax, zMax);
2057 glColor3d(1., 0., 0.);
2062 DrawBoxOutline(
box[0].X(),
box[1].X(),
2074 DrawBoxOutline(
box[0].X(),
box[1].X(),
2091 (
box[0].Y() +
box[2].Y()) / 2,
2092 (
box[0].Z() +
box[4].Z()) / 2};
2095 glTranslated(-center[0], -center[1], -center[2]);
2122 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2124 glMatrixMode(GL_PROJECTION);
2128 glMatrixMode(GL_MODELVIEW);
2139 glColor4ub(color[0], color[1], color[2], 150);
2140 glVertex2d(leftX, margin + i *
h);
2141 glVertex2d(rightX, margin + i *
h);
2142 glVertex2d(rightX, margin + (i + 1) *
h);
2143 glVertex2d(leftX, margin + (i + 1) *
h);
2148 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
2149 glColor4d(0., 0., 0., 0.5);
2153 glVertex2d(leftX, margin + i *
h);
2154 glVertex2d(rightX, margin + i *
h);
2155 glVertex2d(rightX, margin + (i + 1) *
h);
2156 glVertex2d(leftX, margin + (i + 1) *
h);
2166 const std::vector<Double_t> & levels)
2172 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2174 glMatrixMode(GL_PROJECTION);
2178 glMatrixMode(GL_MODELVIEW);
2185 const Double_t range = levels.back() - levels.front();
2190 const Double_t yMin = margin + (levels[i] - levels.front()) / range *
h;
2191 const Double_t yMax = margin + (levels[i + 1] - levels.front()) / range *
h;
2194 glColor4ub(color[0], color[1], color[2], opacity);
2195 glVertex2d(leftX, yMin);
2196 glVertex2d(rightX, yMin);
2197 glVertex2d(rightX, yMax);
2198 glVertex2d(leftX, yMax);
2203 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
2204 glColor4d(0., 0., 0., 0.5);
2207 const Double_t yMin = (levels[i] - levels.front()) / range *
h;
2208 const Double_t yMax = (levels[i + 1] - levels.front()) / range *
h;
2211 glVertex2d(leftX, margin + yMin);
2212 glVertex2d(rightX, margin + yMin);
2213 glVertex2d(rightX, margin + yMax);
2214 glVertex2d(leftX, margin + yMax);
2230 pixelW =
UInt_t(pixelW / scale);
2231 pixelH =
UInt_t(pixelH / scale);
2236 +
gPad->GetYlowNDC() *
gPad->GetWh())));
2238 +
gPad->GetYlowNDC() *
gPad->GetWh())));
2254 TGaxis axisPainter(
x, yMin,
x, yMax, zMin, zMax, 510, logZ ?
"G" :
"");
2255 axisPainter.
Paint();
2257 gPad->SetLogx(logX);
2258 gPad->SetLogy(logY);
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TStyle * gStyle
#define R__LOCKGUARD(mutex)
R__EXTERN TVirtualPS * gVirtualPS
const TGLPlotPainter * fPainter
PlotTranslation(const TGLPlotPainter *painter)
Class to manage histogram axis.
Bool_t IsVariableBinSize() const
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual Int_t GetEntries() const
The color creation and management class.
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
A 3-Dim function with parameters.
void SetRowLen(Int_t len)
Used by plot-painters to determine the area of the plot that is cut away.
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.
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.
const UChar_t * GetColour(Double_t z) const
Get color.
Int_t GetPaletteSize() const
Get. Palette. Size.
void DisableTexture() const
Disable 1D texture.
Double_t GetTexCoord(Double_t z) const
Get tex coordinate.
Bool_t GeneratePalette(UInt_t paletteSize, const Rgl::Range_t &zRange, Bool_t checkSize=kTRUE)
Try to find colors for palette.
void EnableTexture(Int_t mode) const
Enable 1D texture.
static void CloseEmbeddedPS()
this function used by gl-in-pad Restore the gVirtualPS output stream
static void StartEmbeddedPS()
this function used by gl-in-pad
Implementation of a box around a histogram/function for plot-painters.
Int_t FindFrontPoint() const
Convert 3d points into window coordinate system and find the nearest.
const TGLVertex3 * Get3DBox() const
Get 3D box.
const TGLVertex3 * Get2DBox() const
Get 2D box.
void SetFrameColor(const TColor *color)
Back box color.
Int_t GetFrontPoint() const
The nearest point.
Camera for TGLPlotPainter and sub-classes.
Int_t GetY() const
viewport[1]
void Apply(Double_t phi, Double_t theta) const
Applies rotations and translations before drawing.
Int_t GetX() const
viewport[0]
void SetCamera() const
Viewport and projection.
Int_t GetWidth() const
viewport[2]
Int_t GetHeight() const
viewport[3]
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.
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.
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,...
void InvalidateSelection()
Selection must be updated.
void DrawSections() const
Draw sections (if any).
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.
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.
@ kTrueColorSelectionBase
@ kHighColorSelectionBase
void SetPadColor(const TColor *color)
Used in a pad.
const TColor * GetPadColor() const
Get pad color.
virtual void DrawPlot() const =0
void PrintPlot() const
Generate PS using gl2ps.
virtual void Paint()
Draw lego/surf/whatever you can.
virtual void InitGL() const =0
TGLPlotCoordinates * fCoord
virtual void DrawSectionXOY() const =0
void SaveProjectionMatrix() const
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 RestoreProjectionMatrix() const
virtual void ClearBuffers() const
virtual void DrawSectionXOZ() const =0
const UChar_t * GetPixelColor(Int_t px, Int_t py) const
Get pixel color.
void ReadColorBuffer(Int_t width, Int_t height)
Read color buffer.
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
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
virtual void Paint(Option_t *chopt="")
Draw this axis with its current attributes.
@ kClipFrame
Clip to the frame boundary.
TH1 is the base class of all histogram classes in ROOT.
virtual Double_t GetMinimumStored() const
virtual Double_t GetNormFactor() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
virtual Double_t GetMaximumStored() const
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
2D Histogram with Polygonal Bins
TList * GetBins()
Returns the TList of all bins in the histogram.
Double_t GetMinimum() const
Returns the minimum value of the histogram.
Double_t GetMaximum() const
Returns the maximum value of the histogram.
The 3-D histogram classes derived from the 1-D histogram classes.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Bool_t GetHistMinimumZero() const
Double_t GetHistTopMargin() const
Int_t GetNumberContours() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void DrawQuadFilled(const TGLVertex3 &v0, const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &normal)
Draw quad face.
const Float_t gNullEmission[]
void ObjectIDToColor(Int_t objectID, Bool_t highColor)
Object id encoded as rgb triplet.
const Float_t gBlueEmission[]
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
void DrawBoxFront(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Int_t fp)
Draws lego's bar as a 3d box.
const Double_t gH2PolyScaleXY
Int_t ColorToObjectID(const UChar_t *color, Bool_t highColor)
void DrawAxes(Int_t frontPoint, const Int_t *viewport, const TGLVertex3 *box2D, const TGLPlotCoordinates *plotCoord, TAxis *xAxis, TAxis *yAxis, TAxis *zAxis)
Using front point, find, where to draw axes and which labels to use for them gVirtualX->SelectWindow(...
Short_t Max(Short_t a, Short_t b)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)
Double_t Log10(Double_t x)
static void output(int code)