Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLTH3Composition.cxx
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 07/08/2009
3
4#include <memory>
5#include <stdexcept>
6
7#include "KeySymbols.h"
8#include "TVirtualX.h"
9#include "Buttons.h"
10#include "TString.h"
11#include "TError.h"
12#include "TColor.h"
13#include "TROOT.h"
14#include "TMath.h"
15
16#include "TGLTH3Composition.h"
17#include "TGLIncludes.h"
18
19/** \class TGLTH3Composition
20\ingroup opengl
21*/
22
24
25////////////////////////////////////////////////////////////////////////////////
26///I have to define it, since explicit copy ctor was declared.
27
29{
30}
31
32namespace {
33
34void CompareAxes(const TAxis *a1, const TAxis *a2, const TString &axisName);
35
36}
37
38////////////////////////////////////////////////////////////////////////////////
39///Add TH3 into collection. Throw if fHists is not empty
40///but ranges are not equal.
41
43{
44 const TAxis *xa = h->GetXaxis();
45 const TAxis *ya = h->GetYaxis();
46 const TAxis *za = h->GetZaxis();
47
48 if (fHists.empty()) {
49 //This is the first hist in a composition,
50 //take its ranges and reset axes for the composition.
51 fXaxis.Set(h->GetNbinsX(), xa->GetBinLowEdge(xa->GetFirst()), xa->GetBinUpEdge(xa->GetLast()));
52 fYaxis.Set(h->GetNbinsY(), ya->GetBinLowEdge(ya->GetFirst()), ya->GetBinUpEdge(ya->GetLast()));
53 fZaxis.Set(h->GetNbinsZ(), za->GetBinLowEdge(za->GetFirst()), za->GetBinUpEdge(za->GetLast()));
54 } else {
55 CompareAxes(xa, GetXaxis(), "X");
56 CompareAxes(ya, GetYaxis(), "Y");
57 CompareAxes(za, GetZaxis(), "Z");
58 }
59
60 fHists.push_back(TH3Pair_t(h, shape));
61}
62
63////////////////////////////////////////////////////////////////////////////////
64///Check if "this" is under cursor.
65
67{
68 if (!fPainter.get())
69 return 9999;
70
71 return fPainter->DistancetoPrimitive(px, py);
72}
73
74////////////////////////////////////////////////////////////////////////////////
75///Mouse and keyboard events.
76
78{
79 fPainter->ExecuteEvent(event, px, py);
80}
81
82////////////////////////////////////////////////////////////////////////////////
83///I cannot show bin content in a status bar -
84///since there can be several bins in one.
85
86char *TGLTH3Composition::GetObjectInfo(Int_t /*px*/, Int_t /*py*/) const
87{
88 static char message[] = "TH3 composition";
89 return message;
90}
91
92////////////////////////////////////////////////////////////////////////////////
93///Paint a composition of 3d hists.
94
96{
97 if (fHists.empty())
98 return;
99
100 //create a painter.
101 if (!fPainter.get())
102 fPainter = std::make_unique<TGLHistPainter>(this);
103
104 fPainter->Paint("dummy");
105}
106
107/** \class TGLTH3CompositionPainter
108\ingroup opengl
109*/
110
112
113////////////////////////////////////////////////////////////////////////////////
114///Ctor.
115
117 TGLPlotCoordinates *coord)
118 : TGLPlotPainter(data, cam, coord, kFALSE, kFALSE, kFALSE),
119 fData(data)
120{
121}
122
123////////////////////////////////////////////////////////////////////////////////
124///Will be never called from TPad.
125
127{
128 static char message[] = "TH3 composition";
129 return message;
130}
131
132////////////////////////////////////////////////////////////////////////////////
133
135{
136 if (fData->fHists.empty())
137 return kFALSE;
138
139 //Prepare plot painter.
140 //Forget about log scale.
144
145 if (!fCoord->SetRanges(fHist, kFALSE, kTRUE))//kFALSE == drawErrors, kTRUE == zAsBins
146 return kFALSE;
147
149 if (fCamera)
151
152 //Loop on hists.
153 const TH3 *h = fData->fHists[0].first;
154 fMinMaxVal.second = h->GetBinContent(fCoord->GetFirstXBin(),
157 fMinMaxVal.first = fMinMaxVal.second;
158
159 for (UInt_t hNum = 0, lastH = fData->fHists.size(); hNum < lastH; ++hNum) {
160 h = fData->fHists[hNum].first;
161 for (Int_t ir = fCoord->GetFirstXBin(); ir <= fCoord->GetLastXBin(); ++ir) {
162 for (Int_t jr = fCoord->GetFirstYBin(); jr <= fCoord->GetLastYBin(); ++jr) {
163 for (Int_t kr = fCoord->GetFirstZBin(); kr <= fCoord->GetLastZBin(); ++kr) {
164 fMinMaxVal.second = TMath::Max(fMinMaxVal.second, h->GetBinContent(ir, jr, kr));
165 fMinMaxVal.first = TMath::Min(fMinMaxVal.first, h->GetBinContent(ir, jr, kr));
166 }
167 }
168 }
169 }
170
171 if (fCoord->Modified()) {
174 }
175
176 return kTRUE;
177}
178
179////////////////////////////////////////////////////////////////////////////////
180///Move plot or box cut.
181
183{
184 fMousePosition.fX = px;
186 fCamera->StartPan(px, py);
188}
189
190////////////////////////////////////////////////////////////////////////////////
191/// User's moving mouse cursor, with middle mouse button pressed (for pad).
192/// Calculate 3d shift related to 2d mouse movement.
193
195{
196 if (fSelectedPart >= fSelectionBase) {//Pan camera.
199
202 fCamera->Pan(px, py);
203
206 } else if (fSelectedPart > 0) {
207 //Convert py into bottom-top orientation.
208 //Possibly, move box here
209 py = fCamera->GetHeight() - py;
212
215
216 if (!fHighColor) {
219 }
220
223 }
224
227}
228
229////////////////////////////////////////////////////////////////////////////////
230///No options for composition.
231
233{
234}
235
236////////////////////////////////////////////////////////////////////////////////
237///Switch on/off box cut.
238
240{
241 if (event == kButton1Double && fBoxCut.IsActive()) {
243 if (!gVirtualX->IsCmdThread())
244 gROOT->ProcessLineFast(Form("((TGLPlotPainter *)0x%zx)->Paint()", (size_t)this));
245 else
246 Paint();
247 } else if (event == kKeyPress && (py == kKey_c || py == kKey_C)) {
248 if (fHighColor)
249 Info("ProcessEvent", "Switch to true color mode to use box cut");
250 else {
253 }
254 }
255}
256
257////////////////////////////////////////////////////////////////////////////////
258/// Initialize some gl state variables.
259
261{
262 glEnable(GL_DEPTH_TEST);
263 glEnable(GL_LIGHTING);
264 glEnable(GL_LIGHT0);
265 glEnable(GL_CULL_FACE);
266 glCullFace(GL_BACK);
267
268 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
269}
270
271////////////////////////////////////////////////////////////////////////////////
272///Return back some gl state variables.
273
275{
276 glDisable(GL_DEPTH_TEST);
277 glDisable(GL_LIGHTING);
278 glDisable(GL_LIGHT0);
279 glDisable(GL_CULL_FACE);
280 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
281}
282
283////////////////////////////////////////////////////////////////////////////////
284///Draw composition of TH3s.
285
287{
288 //Shift plot to point of origin.
289 const Rgl::PlotTranslation trGuard(this);
290
292
293 if (!fSelectionPass) {
294 glEnable(GL_POLYGON_OFFSET_FILL);//[0
295 glPolygonOffset(1.f, 1.f);
296 } else
297 return;
298
299 //Using front point, find the correct order to draw boxes from
300 //back to front/from bottom to top (it's important only for semi-transparent boxes).
301 const Int_t frontPoint = fBackBox.GetFrontPoint();
302 Int_t irInit = fCoord->GetFirstXBin(), iInit = 0;
303 const Int_t nX = fCoord->GetNXBins();
304 Int_t jrInit = fCoord->GetFirstYBin(), jInit = 0;
305 const Int_t nY = fCoord->GetNYBins();
306 Int_t krInit = fCoord->GetFirstZBin(), kInit = 0;
307 const Int_t nZ = fCoord->GetNZBins();
308
309 const Int_t addI = frontPoint == 2 || frontPoint == 1 ? 1 : (iInit = nX - 1, irInit = fCoord->GetLastXBin(), -1);
310 const Int_t addJ = frontPoint == 2 || frontPoint == 3 ? 1 : (jInit = nY - 1, jrInit = fCoord->GetLastYBin(), -1);
311 const Int_t addK = fBackBox.Get2DBox()[frontPoint + 4].Y() < fBackBox.Get2DBox()[frontPoint].Y() ? 1
312 : (kInit = nZ - 1, krInit = fCoord->GetLastZBin(),-1);
313 const Double_t xScale = fCoord->GetXScale();
314 const Double_t yScale = fCoord->GetYScale();
315 const Double_t zScale = fCoord->GetZScale();
316 const TAxis *xA = fXAxis;
317 const TAxis *yA = fYAxis;
318 const TAxis *zA = fZAxis;
319
320 Double_t maxContent = TMath::Max(TMath::Abs(fMinMaxVal.first), TMath::Abs(fMinMaxVal.second));
321 if(!maxContent)//bad, find better way to check zero.
322 maxContent = 1.;
323
324 for (UInt_t hNum = 0; hNum < fData->fHists.size(); ++hNum) {
325 const TH3 *h = fData->fHists[hNum].first;
326 const TGLTH3Composition::ETH3BinShape shape = fData->fHists[hNum].second;
327 SetColor(h->GetFillColor());
328
329 for(Int_t ir = irInit, i = iInit; addI > 0 ? i < nX : i >= 0; ir += addI, i += addI) {
330 for(Int_t jr = jrInit, j = jInit; addJ > 0 ? j < nY : j >= 0; jr += addJ, j += addJ) {
331 for(Int_t kr = krInit, k = kInit; addK > 0 ? k < nZ : k >= 0; kr += addK, k += addK) {
332 const Double_t binContent = h->GetBinContent(ir, jr, kr);
333 const Double_t w = TMath::Abs(binContent) / maxContent;
334 if (!w)
335 continue;
336
337 const Double_t xMin = xScale * (xA->GetBinLowEdge(ir) / 2 + xA->GetBinUpEdge(ir) / 2 - w * xA->GetBinWidth(ir) / 2);
338 const Double_t xMax = xScale * (xA->GetBinLowEdge(ir) / 2 + xA->GetBinUpEdge(ir) / 2 + w * xA->GetBinWidth(ir) / 2);
339 const Double_t yMin = yScale * (yA->GetBinLowEdge(jr) / 2 + yA->GetBinUpEdge(jr) / 2 - w * yA->GetBinWidth(jr) / 2);
340 const Double_t yMax = yScale * (yA->GetBinLowEdge(jr) / 2 + yA->GetBinUpEdge(jr) / 2 + w * yA->GetBinWidth(jr) / 2);
341 const Double_t zMin = zScale * (zA->GetBinLowEdge(kr) / 2 + zA->GetBinUpEdge(kr) / 2 - w * zA->GetBinWidth(kr) / 2);
342 const Double_t zMax = zScale * (zA->GetBinLowEdge(kr) / 2 + zA->GetBinUpEdge(kr) / 2 + w * zA->GetBinWidth(kr) / 2);
343
344 if (fBoxCut.IsActive() && fBoxCut.IsInCut(xMin, xMax, yMin, yMax, zMin, zMax))
345 continue;
346
347 if (shape == TGLTH3Composition::kSphere)
348 Rgl::DrawSphere(&fQuadric, xMin, xMax, yMin, yMax, zMin, zMax);
349 else
350 Rgl::DrawBoxFront(xMin, xMax, yMin, yMax, zMin, zMax, frontPoint);
351 }
352 }
353 }
354 }
355
356 if (fBoxCut.IsActive())
358
359 glDisable(GL_POLYGON_OFFSET_FILL);//0]
360 const TGLDisableGuard lightGuard(GL_LIGHTING);//[2 - 2]
361 glColor4d(0., 0., 0., 0.25);
362 glPolygonMode(GL_FRONT, GL_LINE);//[3
363
364 const TGLEnableGuard blendGuard(GL_BLEND);//[4-4] + 1]
365 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
366 const TGLEnableGuard smoothGuard(GL_LINE_SMOOTH);//[5-5]
367 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
368
369 for (UInt_t hNum = 0; hNum < fData->fHists.size(); ++hNum) {
370 if (fData->fHists[hNum].second == TGLTH3Composition::kSphere)
371 continue;//No outlines for spherical bins.
372
373 const TH3 *h = fData->fHists[hNum].first;
374
375 for(Int_t ir = irInit, i = iInit; addI > 0 ? i < nX : i >= 0; ir += addI, i += addI) {
376 for(Int_t jr = jrInit, j = jInit; addJ > 0 ? j < nY : j >= 0; jr += addJ, j += addJ) {
377 for(Int_t kr = krInit, k = kInit; addK > 0 ? k < nZ : k >= 0; kr += addK, k += addK) {
378 const Double_t w = TMath::Abs(h->GetBinContent(ir, jr, kr)) / maxContent;
379 if (!w)
380 continue;
381
382 const Double_t xMin = xScale * (xA->GetBinLowEdge(ir) / 2 + xA->GetBinUpEdge(ir) / 2 - w * xA->GetBinWidth(ir) / 2);
383 const Double_t xMax = xScale * (xA->GetBinLowEdge(ir) / 2 + xA->GetBinUpEdge(ir) / 2 + w * xA->GetBinWidth(ir) / 2);
384 const Double_t yMin = yScale * (yA->GetBinLowEdge(jr) / 2 + yA->GetBinUpEdge(jr) / 2 - w * yA->GetBinWidth(jr) / 2);
385 const Double_t yMax = yScale * (yA->GetBinLowEdge(jr) / 2 + yA->GetBinUpEdge(jr) / 2 + w * yA->GetBinWidth(jr) / 2);
386 const Double_t zMin = zScale * (zA->GetBinLowEdge(kr) / 2 + zA->GetBinUpEdge(kr) / 2 - w * zA->GetBinWidth(kr) / 2);
387 const Double_t zMax = zScale * (zA->GetBinLowEdge(kr) / 2 + zA->GetBinUpEdge(kr) / 2 + w * zA->GetBinWidth(kr) / 2);
388
389 if (fBoxCut.IsActive() && fBoxCut.IsInCut(xMin, xMax, yMin, yMax, zMin, zMax))
390 continue;
391
392 Rgl::DrawBoxFront(xMin, xMax, yMin, yMax, zMin, zMax, frontPoint);
393 }
394 }
395 }
396 }
397
398 glPolygonMode(GL_FRONT, GL_FILL);//3]
399}
400
401////////////////////////////////////////////////////////////////////////////////
402///Set material.
403
405{
406 Float_t diffColor[] = {0.8f, 0.8f, 0.8f, 0.05f};
407
408 if (color != kWhite)
409 if (const TColor *c = gROOT->GetColor(color))
410 c->GetRGB(diffColor[0], diffColor[1], diffColor[2]);
411
412 glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffColor);
413 const Float_t specColor[] = {1.f, 1.f, 1.f, 1.f};
414 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specColor);
415 glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 70.f);
416}
417
418namespace {
419
420////////////////////////////////////////////////////////////////////////////////
421
422void AxisError(const TString & errorMsg)
423{
424 Error("TGLTH3Composition::AddTH3", "%s", errorMsg.Data());
425 throw std::runtime_error(errorMsg.Data());
426}
427
428////////////////////////////////////////////////////////////////////////////////
429///Check number of bins.
430
431void CompareAxes(const TAxis *a1, const TAxis *a2, const TString &axisName)
432{
433 if (a1->GetNbins() != a2->GetNbins())
434 AxisError("New hist has different number of bins along " + axisName);
435
436 //Check bin ranges.
437 const Int_t firstBin1 = a1->GetFirst(), lastBin1 = a1->GetLast();
438 const Int_t firstBin2 = a2->GetFirst(), lastBin2 = a2->GetLast();
439
440 if (firstBin1 != firstBin2)
441 AxisError("New hist has different first bin along " + axisName);
442
443 if (lastBin1 != lastBin2)
444 AxisError("New hist has different last bin along " + axisName);
445
446 const Double_t eps = 1e-7;//?????:((((
447 //Check axes ranges.
448 if (TMath::Abs(a1->GetBinLowEdge(firstBin1) - a2->GetBinLowEdge(firstBin2)) > eps)
449 AxisError("New hist has different low edge along " + axisName);
450 if (TMath::Abs(a1->GetBinUpEdge(lastBin1) - a2->GetBinUpEdge(lastBin2)) > eps)
451 AxisError("New hist has different low edge along " + axisName);
452}
453
454}
@ kKeyPress
Definition Buttons.h:20
@ kButton1Double
Definition Buttons.h:24
#define GL_TRUE
Definition GL_glu.h:262
#define GL_FALSE
Definition GL_glu.h:261
@ kKey_C
Definition KeySymbols.h:128
@ kKey_c
Definition KeySymbols.h:160
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
#define e(i)
Definition RSha256.hxx:103
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
@ kWhite
Definition Rtypes.h:65
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition TError.cxx:218
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:185
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
#define gROOT
Definition TROOT.h:407
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2489
#define gVirtualX
Definition TVirtualX.h:337
Class to manage histogram axis.
Definition TAxis.h:31
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition TAxis.cxx:518
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
Definition TAxis.cxx:794
Int_t GetLast() const
Return last bin on the axis i.e.
Definition TAxis.cxx:469
Int_t GetNbins() const
Definition TAxis.h:125
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition TAxis.cxx:540
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition TAxis.cxx:528
Int_t GetFirst() const
Return first bin on the axis i.e.
Definition TAxis.cxx:458
The color creation and management class.
Definition TColor.h:21
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1839
void MoveBox(Int_t px, Int_t py, Int_t axisID)
Move box cut along selected direction.
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 StartMovement(Int_t px, Int_t py)
Start cut's movement.
Bool_t IsActive() const
void SetPlotBox(const Rgl::Range_t &xRange, const Rgl::Range_t &yRange, const Rgl::Range_t &zRange)
Set up a frame box.
const TGLVertex3 * Get3DBox() const
Get 3D box.
const TGLVertex3 * Get2DBox() const
Get 2D box.
void DrawBox(Int_t selectedPart, Bool_t selectionPass, const std::vector< Double_t > &zLevels, Bool_t highColor) const
Draw back box for a plot.
Int_t GetFrontPoint() const
The nearest point.
Camera for TGLPlotPainter and sub-classes.
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
void Apply(Double_t phi, Double_t theta) const
Applies rotations and translations before drawing.
void SetCamera() const
Viewport and projection.
void Pan(Int_t px, Int_t py)
Pan camera.
Int_t GetHeight() const
viewport[3]
void SetViewVolume(const TGLVertex3 *box)
'box' is the TGLPlotPainter's back box's coordinates.
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
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.
Int_t GetFirstXBin() const
Int_t GetFirstYBin() const
const Rgl::Range_t & GetYRangeScaled() const
Scaled range.
void ResetModified()
Reset modified.
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.
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.
Int_t GetLastYBin() const
Int_t GetNYBins() const
Number of Y bins.
Int_t GetLastXBin() const
Int_t GetNZBins() const
Number of Z bins.
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms,...
std::vector< Double_t > fZLevels
void RestoreModelviewMatrix() const
TGLPlotCoordinates * fCoord
void Paint() override
Draw lego/surf/whatever you can.
TGLPlotBox fBackBox
void SaveProjectionMatrix() const
void SaveModelviewMatrix() const
TGLPlotCamera * fCamera
void RestoreProjectionMatrix() const
void ProcessEvent(Int_t event, Int_t px, Int_t py) override
Switch on/off box cut.
void StartPan(Int_t px, Int_t py) override
Move plot or box cut.
void DeInitGL() const override
Return back some gl state variables.
char * GetPlotInfo(Int_t px, Int_t py) override
Will be never called from TPad.
void Pan(Int_t px, Int_t py) override
User's moving mouse cursor, with middle mouse button pressed (for pad).
TGLTH3Composition * fData
void AddOption(const TString &option) override
No options for composition.
std::pair< Double_t, Double_t > fMinMaxVal
void InitGL() const override
Initialize some gl state variables.
void SetColor(Int_t color) const
Set material.
void DrawPlot() const override
Draw composition of TH3s.
TGLTH3CompositionPainter(TGLTH3Composition *data, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
Ctor.
void AddTH3(const TH3 *hist, ETH3BinShape shape=kBox)
Add TH3 into collection.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Check if "this" is under cursor.
std::vector< TH3Pair_t > fHists
void Paint(Option_t *option) override
Paint a composition of 3d hists.
TGLTH3Composition()
I have to define it, since explicit copy ctor was declared.
char * GetObjectInfo(Int_t px, Int_t py) const override
I cannot show bin content in a status bar - since there can be several bins in one.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Mouse and keyboard events.
std::pair< const TH3 *, ETH3BinShape > TH3Pair_t
std::unique_ptr< TGLHistPainter > fPainter
Double_t Y() const
Definition TGLUtil.h:121
TAxis * GetZaxis()
Definition TH1.h:326
TAxis * GetXaxis()
Definition TH1.h:324
TAxis * GetYaxis()
Definition TH1.h:325
TAxis fZaxis
Z axis descriptor.
Definition TH1.h:92
TAxis fXaxis
X axis descriptor.
Definition TH1.h:90
TAxis fYaxis
Y axis descriptor.
Definition TH1.h:91
The 3-D histogram classes derived from the 1-D histogram classes.
Definition TH3.h:31
SCoord_t fY
Definition TPoint.h:36
SCoord_t fX
Definition TPoint.h:35
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
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.
Definition TGLUtil.cxx:3016
void DrawSphere(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Cylinder for lego3.
Definition TGLUtil.cxx:3284
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:250
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Definition TMathBase.h:198
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:123