ROOT  6.06/09
Reference Guide
TMarker3DBox.cxx
Go to the documentation of this file.
1 // @(#)root/g3d:$Id$
2 // Author: Rene Brun , Olivier Couet 31/10/97
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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  *************************************************************************/
11 
12 #include "Riostream.h"
13 #include "TROOT.h"
14 #include "TView.h"
15 #include "TMarker3DBox.h"
16 #include "TVirtualPad.h"
17 #include "TH1.h"
18 #include "TH3.h"
19 #include "TBuffer3D.h"
20 #include "TBuffer3DTypes.h"
21 #include "TVirtualViewer3D.h"
22 #include "TGeometry.h"
23 #include "TClass.h"
24 #include "TMath.h"
25 
26 #include <assert.h>
27 
29 
30 /** \class TMarker3DBox
31 \ingroup g3d
32 A special 3-D marker designed for event display.
33 
34 It has the following parameters:
35  - fX: X coordinate of the center of the box
36  - fY: Y coordinate of the center of the box
37  - fZ: Z coordinate of the center of the box
38  - fDx: half length in X
39  - fDy: half length in Y
40  - fDz: half length in Z
41  - fTheta: Angle of box z axis with respect to main Z axis
42  - fPhi: Angle of box x axis with respect to main Xaxis
43  - fRefObject: A reference to an object
44 */
45 
46 ////////////////////////////////////////////////////////////////////////////////
47 /// Marker3DBox default constructor
48 
50 {
51  fRefObject = 0;
52  fDx = 1;
53  fDy = 1;
54  fDz = 1;
55  fX = 0;
56  fY = 0;
57  fZ = 0;
58  fTheta = 0;
59  fPhi = 0;
60  SetBit(kTemporary,kFALSE);
61 }
62 
63 ////////////////////////////////////////////////////////////////////////////////
64 /// Marker3DBox normal constructor
65 
67  Float_t dx, Float_t dy, Float_t dz,
68  Float_t theta, Float_t phi)
69  :TAttLine(1,1,1), TAttFill(1,0)
70 {
71  fDx = dx;
72  fDy = dy;
73  fDz = dz;
74  fX = x;
75  fY = y;
76  fZ = z;
77  fTheta = theta;
78  fPhi = phi;
79  fRefObject = 0;
81 }
82 
83 ////////////////////////////////////////////////////////////////////////////////
84 /// copy constructor
85 
87  TObject(m3d),
88  TAttLine(m3d),
89  TAttFill(m3d),
90  TAtt3D(m3d),
91  fX(m3d.fX),
92  fY(m3d.fY),
93  fZ(m3d.fZ),
94  fDx(m3d.fDx),
95  fDy(m3d.fDy),
96  fDz(m3d.fDz),
97  fTheta(m3d.fTheta),
98  fPhi(m3d.fPhi),
99  fRefObject(m3d.fRefObject)
100 {
101 }
102 
103 ////////////////////////////////////////////////////////////////////////////////
104 /// assignment operator
105 
107 {
108  if(this!=&m3d) {
109  TObject::operator=(m3d);
110  TAttLine::operator=(m3d);
111  TAttFill::operator=(m3d);
112  TAtt3D::operator=(m3d);
113  fX=m3d.fX;
114  fY=m3d.fY;
115  fZ=m3d.fZ;
116  fDx=m3d.fDx;
117  fDy=m3d.fDy;
118  fDz=m3d.fDz;
119  fTheta=m3d.fTheta;
120  fPhi=m3d.fPhi;
121  fRefObject=m3d.fRefObject;
122  }
123  return *this;
124 }
125 
126 ////////////////////////////////////////////////////////////////////////////////
127 /// Marker3DBox shape default destructor
128 
130 {
131 }
132 
133 
134 ////////////////////////////////////////////////////////////////////////////////
135 /// Compute distance from point px,py to a Marker3DBox
136 ///
137 /// Compute the closest distance of approach from point px,py to each corner
138 /// point of the Marker3DBox.
139 
141 {
142  const Int_t numPoints = 8;
143  Int_t dist = 9999;
144  Double_t points[3*numPoints];
145 
146  TView *view = gPad->GetView();
147  if (!view) return dist;
148  const Int_t seg1[12] = {0,1,2,3,4,5,6,7,0,1,2,3};
149  const Int_t seg2[12] = {1,2,3,0,5,6,7,4,4,5,6,7};
150 
151  SetPoints(points);
152 
153  Int_t i, i1, i2, dsegment;
154  Double_t x1,y1,x2,y2;
155  Double_t xndc[3];
156  for (i = 0; i < 12; i++) {
157  i1 = 3*seg1[i];
158  view->WCtoNDC(&points[i1], xndc);
159  x1 = xndc[0];
160  y1 = xndc[1];
161 
162  i2 = 3*seg2[i];
163  view->WCtoNDC(&points[i2], xndc);
164  x2 = xndc[0];
165  y2 = xndc[1];
166  dsegment = DistancetoLine(px,py,x1,y1,x2,y2);
167  if (dsegment < dist) dist = dsegment;
168  }
169  if (dist < 5) {
170  gPad->SetCursor(kCross);
171  if (fRefObject) {gPad->SetSelected(fRefObject); return 0;}
172  }
173  return dist;
174 }
175 
176 ////////////////////////////////////////////////////////////////////////////////
177 /// Execute action corresponding to one event
178 ///
179 /// This member function must be implemented to realize the action
180 /// corresponding to the mouse click on the object in the window
181 
183 {
184  if (!gPad) return;
185  if (gPad->GetView()) gPad->GetView()->ExecuteRotateView(event, px, py);
186 }
187 
188 ////////////////////////////////////////////////////////////////////////////////
189 /// Paint marker 3D box.
190 
191 void TMarker3DBox::Paint(Option_t * /* option */ )
192 {
193  static TBuffer3D buffer(TBuffer3DTypes::kGeneric);
194 
195  buffer.ClearSectionsValid();
196 
197  // Section kCore
198 
199  // If we are just a temporary object then no 'real object' to
200  // pass to viewer
201  if (TestBit(kTemporary)) {
202  buffer.fID = 0;
203  } else {
204  buffer.fID = this;
205  }
206  buffer.fColor = GetLineColor();
207  buffer.fTransparency = 0;
208  buffer.fLocalFrame = kFALSE;
210 
211  // We fill kCore and kRawSizes on first pass and try with viewer
212  TVirtualViewer3D * viewer3D = gPad->GetViewer3D();
213  if (!viewer3D) return;
214  Int_t reqSections = viewer3D->AddObject(buffer);
215  if (reqSections == TBuffer3D::kNone) {
216  return;
217  }
218 
219  if (reqSections & TBuffer3D::kRawSizes) {
220  Int_t nbPnts = 8;
221  Int_t nbSegs = 12;
222  Int_t nbPols = 6;
223  if (!buffer.SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
224  return;
225  }
226  buffer.SetSectionsValid(TBuffer3D::kRawSizes);
227  }
228 
229  if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
230  // Points
231  SetPoints(buffer.fPnts);
232 
233  // Transform points
234  if (gGeometry && !buffer.fLocalFrame) {
235  Double_t dlocal[3];
236  Double_t dmaster[3];
237  for (UInt_t j=0; j<buffer.NbPnts(); j++) {
238  dlocal[0] = buffer.fPnts[3*j];
239  dlocal[1] = buffer.fPnts[3*j+1];
240  dlocal[2] = buffer.fPnts[3*j+2];
241  gGeometry->Local2Master(&dlocal[0],&dmaster[0]);
242  buffer.fPnts[3*j] = dmaster[0];
243  buffer.fPnts[3*j+1] = dmaster[1];
244  buffer.fPnts[3*j+2] = dmaster[2];
245  }
246  }
247 
248  // Basic colors: 0, 1, ... 8
249  Int_t c = (((GetLineColor()) %8) -1) * 4;
250  if (c < 0) c = 0;
251 
252  // Segments
253  buffer.fSegs[ 0] = c ; buffer.fSegs[ 1] = 0 ; buffer.fSegs[ 2] = 1;
254  buffer.fSegs[ 3] = c+1 ; buffer.fSegs[ 4] = 1 ; buffer.fSegs[ 5] = 2;
255  buffer.fSegs[ 6] = c+1 ; buffer.fSegs[ 7] = 2 ; buffer.fSegs[ 8] = 3;
256  buffer.fSegs[ 9] = c ; buffer.fSegs[10] = 3 ; buffer.fSegs[11] = 0;
257  buffer.fSegs[12] = c+2 ; buffer.fSegs[13] = 4 ; buffer.fSegs[14] = 5;
258  buffer.fSegs[15] = c+2 ; buffer.fSegs[16] = 5 ; buffer.fSegs[17] = 6;
259  buffer.fSegs[18] = c+3 ; buffer.fSegs[19] = 6 ; buffer.fSegs[20] = 7;
260  buffer.fSegs[21] = c+3 ; buffer.fSegs[22] = 7 ; buffer.fSegs[23] = 4;
261  buffer.fSegs[24] = c ; buffer.fSegs[25] = 0 ; buffer.fSegs[26] = 4;
262  buffer.fSegs[27] = c+2 ; buffer.fSegs[28] = 1 ; buffer.fSegs[29] = 5;
263  buffer.fSegs[30] = c+1 ; buffer.fSegs[31] = 2 ; buffer.fSegs[32] = 6;
264  buffer.fSegs[33] = c+3 ; buffer.fSegs[34] = 3 ; buffer.fSegs[35] = 7;
265 
266  // Polygons
267  buffer.fPols[ 0] = c ; buffer.fPols[ 1] = 4 ; buffer.fPols[ 2] = 0;
268  buffer.fPols[ 3] = 9 ; buffer.fPols[ 4] = 4 ; buffer.fPols[ 5] = 8;
269  buffer.fPols[ 6] = c+1 ; buffer.fPols[ 7] = 4 ; buffer.fPols[ 8] = 1;
270  buffer.fPols[ 9] = 10 ; buffer.fPols[10] = 5 ; buffer.fPols[11] = 9;
271  buffer.fPols[12] = c ; buffer.fPols[13] = 4 ; buffer.fPols[14] = 2;
272  buffer.fPols[15] = 11 ; buffer.fPols[16] = 6 ; buffer.fPols[17] = 10;
273  buffer.fPols[18] = c+1 ; buffer.fPols[19] = 4 ; buffer.fPols[20] = 3;
274  buffer.fPols[21] = 8 ; buffer.fPols[22] = 7 ; buffer.fPols[23] = 11;
275  buffer.fPols[24] = c+2 ; buffer.fPols[25] = 4 ; buffer.fPols[26] = 0;
276  buffer.fPols[27] = 3 ; buffer.fPols[28] = 2 ; buffer.fPols[29] = 1;
277  buffer.fPols[30] = c+3 ; buffer.fPols[31] = 4 ; buffer.fPols[32] = 4;
278  buffer.fPols[33] = 5 ; buffer.fPols[34] = 6 ; buffer.fPols[35] = 7;
279 
280  buffer.SetSectionsValid(TBuffer3D::kRaw);
281 
284  }
285 
286  viewer3D->AddObject(buffer);
287 }
288 
289 ////////////////////////////////////////////////////////////////////////////////
290 /// Paint 3-d histogram h with marker3dboxes
291 
293 {
294  Int_t bin,ix,iy,iz;
295  Double_t xmin,xmax,ymin,ymax,zmin,zmax,wmin,wmax,w;
296  TAxis *xaxis = h->GetXaxis();
297  TAxis *yaxis = h->GetYaxis();
298  TAxis *zaxis = h->GetZaxis();
299 
300  //compute min and max of all cells
301  wmin = wmax = 0;
302  for (iz=zaxis->GetFirst();iz<=zaxis->GetLast();iz++) {
303  for (iy=yaxis->GetFirst();iy<=yaxis->GetLast();iy++) {
304  for (ix=xaxis->GetFirst();ix<=xaxis->GetLast();ix++) {
305  bin = h->GetBin(ix,iy,iz);
306  w = h->GetBinContent(bin);
307  if (w > wmax) wmax = w;
308  if (w < wmin) wmin = w;
309  }
310  }
311  }
312 
313  //Create or modify 3-d view object
314  TView *view = gPad->GetView();
315  if (!view) {
316  gPad->Range(-1,-1,1,1);
317  view = TView::CreateView(1,0,0);
318  if (!view) return;
319  }
320  view->SetRange(xaxis->GetBinLowEdge(xaxis->GetFirst()),
321  yaxis->GetBinLowEdge(yaxis->GetFirst()),
322  zaxis->GetBinLowEdge(zaxis->GetFirst()),
323  xaxis->GetBinUpEdge(xaxis->GetLast()),
324  yaxis->GetBinUpEdge(yaxis->GetLast()),
325  zaxis->GetBinUpEdge(zaxis->GetLast()));
326 
327  view->PadRange(gPad->GetFrameFillColor());
328 
329  //Draw TMarker3DBox with size proportional to cell content
330  TMarker3DBox m3;
331  m3.SetBit(kTemporary,kTRUE);
332  m3.SetRefObject(h);
333  m3.SetDirection(0,0);
334  m3.SetLineColor(h->GetMarkerColor());
335  Double_t scale;
336  for (ix=xaxis->GetFirst();ix<=xaxis->GetLast();ix++) {
337  xmin = h->GetXaxis()->GetBinLowEdge(ix);
338  xmax = xmin + h->GetXaxis()->GetBinWidth(ix);
339  for (iy=yaxis->GetFirst();iy<=yaxis->GetLast();iy++) {
340  ymin = h->GetYaxis()->GetBinLowEdge(iy);
341  ymax = ymin + h->GetYaxis()->GetBinWidth(iy);
342  for (iz=zaxis->GetFirst();iz<=zaxis->GetLast();iz++) {
343  zmin = h->GetZaxis()->GetBinLowEdge(iz);
344  zmax = zmin + h->GetZaxis()->GetBinWidth(iz);
345  bin = h->GetBin(ix,iy,iz);
346  w = h->GetBinContent(bin);
347  if (w == 0) continue;
348  scale = (w-wmin)/(wmax-wmin);
349  m3.SetPosition(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax));
350  m3.SetSize(scale*(xmax-xmin),scale*(ymax-ymin),scale*(zmax-zmin));
351  m3.Paint(option);
352  }
353  }
354  }
355 }
356 
357 ////////////////////////////////////////////////////////////////////////////////
358 /// Save primitive as a C++ statement(s) on output stream out
359 
360 void TMarker3DBox::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
361 {
362  out<<" "<<std::endl;
363  if (gROOT->ClassSaved(TMarker3DBox::Class())) {
364  out<<" ";
365  } else {
366  out<<" TMarker3DBox *";
367  }
368  out<<"marker3DBox = new TMarker3DBox("<<fX<<","
369  <<fY<<","
370  <<fZ<<","
371  <<fDx<<","
372  <<fDy<<","
373  <<fDz<<","
374  <<fTheta<<","
375  <<fPhi<<");"<<std::endl;
376 
377  SaveLineAttributes(out,"marker3DBox",1,1,1);
378  SaveFillAttributes(out,"marker3DBox",1,0);
379 
380  out<<" marker3DBox->Draw();"<<std::endl;
381 }
382 
383 ////////////////////////////////////////////////////////////////////////////////
384 /// Set direction.
385 
387 {
388  fTheta = theta;
389  fPhi = phi;
390 }
391 
392 ////////////////////////////////////////////////////////////////////////////////
393 /// Set size.
394 
396 {
397  fDx = dx;
398  fDy = dy;
399  fDz = dz;
400 }
401 
402 ////////////////////////////////////////////////////////////////////////////////
403 /// Set position.
404 
406 {
407  fX = x;
408  fY = y;
409  fZ = z;
410 }
411 
412 ////////////////////////////////////////////////////////////////////////////////
413 /// Set points.
414 
416 {
417  if (points) {
418  points[ 0] = -fDx ; points[ 1] = -fDy ; points[ 2] = -fDz;
419  points[ 3] = -fDx ; points[ 4] = fDy ; points[ 5] = -fDz;
420  points[ 6] = fDx ; points[ 7] = fDy ; points[ 8] = -fDz;
421  points[ 9] = fDx ; points[10] = -fDy ; points[11] = -fDz;
422  points[12] = -fDx ; points[13] = -fDy ; points[14] = fDz;
423  points[15] = -fDx ; points[16] = fDy ; points[17] = fDz;
424  points[18] = fDx ; points[19] = fDy ; points[20] = fDz;
425  points[21] = fDx ; points[22] = -fDy ; points[23] = fDz;
426 
427  Double_t x, y, z;
428  const Double_t kPI = TMath::Pi();
429  Double_t theta = fTheta*kPI/180;
430  Double_t phi = fPhi*kPI/180;
431  Double_t sinth = TMath::Sin(theta);
432  Double_t costh = TMath::Cos(theta);
433  Double_t sinfi = TMath::Sin(phi);
434  Double_t cosfi = TMath::Cos(phi);
435 
436  // Matrix to convert from fruit frame to master frame
437  Double_t m[9];
438  m[0] = costh * cosfi; m[1] = -sinfi; m[2] = sinth*cosfi;
439  m[3] = costh * sinfi; m[4] = cosfi; m[5] = sinth*sinfi;
440  m[6] = -sinth; m[7] = 0; m[8] = costh;
441  for (Int_t i = 0; i < 8; i++) {
442  x = points[3*i];
443  y = points[3*i+1];
444  z = points[3*i+2];
445 
446  points[3*i] = fX + m[0] * x + m[1] * y + m[2] * z;
447  points[3*i+1] = fY + m[3] * x + m[4] * y + m[5] * z;
448  points[3*i+2] = fZ + m[6] * x + m[7] * y + m[8] * z;
449  }
450  }
451 }
452 
453 ////////////////////////////////////////////////////////////////////////////////
454 /// Stream an object of class TMarker3DBox.
455 
456 void TMarker3DBox::Streamer(TBuffer &R__b)
457 {
458  if (R__b.IsReading()) {
459  UInt_t R__s, R__c;
460  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
461  if (R__v > 1) {
462  R__b.ReadClassBuffer(TMarker3DBox::Class(), this, R__v, R__s, R__c);
463  return;
464  }
465  //====process old versions before automatic schema evolution
466  TObject::Streamer(R__b);
467  TAttLine::Streamer(R__b);
468  TAttFill::Streamer(R__b);
469  if (R__b.GetVersionOwner() > 22300) {
470  TAtt3D::Streamer(R__b);
471  } else {
472  TAtt3D::Streamer(R__b);
473  }
474  R__b >> fX;
475  R__b >> fY;
476  R__b >> fZ;
477  R__b >> fDx;
478  R__b >> fDy;
479  R__b >> fDz;
480  R__b >> fTheta;
481  R__b >> fPhi;
482  R__b >> fRefObject;
483  R__b.CheckByteCount(R__s, R__c, TMarker3DBox::IsA());
484  //====end of old versions
485 
486  } else {
488  }
489 }
Int_t GetFirst() const
Return first bin on the axis i.e.
Definition: TAxis.cxx:429
virtual void SetRefObject(TObject *obj=0)
Definition: TMarker3DBox.h:85
double dist(Rotation3D const &r1, Rotation3D const &r2)
Definition: 3DDistances.cxx:48
float xmin
Definition: THbookFile.cxx:93
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4629
Bool_t IsReading() const
Definition: TBuffer.h:81
short Version_t
Definition: RtypesCore.h:61
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
TH1 * h
Definition: legend2.C:5
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Marker3DBox.
See TView3D.
Definition: TView.h:36
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:29
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition: TAxis.cxx:489
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
#define gROOT
Definition: TROOT.h:340
virtual void SetRange(const Double_t *min, const Double_t *max)=0
void ClearSectionsValid()
Clear any sections marked valid.
Definition: TBuffer3D.cxx:284
virtual ~TMarker3DBox()
Marker3DBox shape default destructor.
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition: TAxis.cxx:511
virtual void Modify()
Change current line attributes if necessary.
Definition: TAttLine.cxx:229
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetDirection(Float_t theta, Float_t phi)
Set direction.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:732
Float_t fX
Definition: TMarker3DBox.h:48
static const double x2[5]
Fill Area Attributes class.
Definition: TAttFill.h:32
Double_t x[n]
Definition: legend1.C:17
void Class()
Definition: Class.C:29
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Definition: TAttLine.cxx:257
virtual Int_t GetVersionOwner() const =0
virtual void Modify()
Change current fill area attributes if necessary.
Definition: TAttFill.cxx:206
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
Definition: TGeometry.cxx:407
virtual void SetPoints(Double_t *buff) const
Set points.
Double_t * fPnts
Definition: TBuffer3D.h:114
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.
Definition: TH1.cxx:4535
Abstract 3D shapes viewer.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.cxx:102
char * out
Definition: TBase64.cxx:29
void SetSectionsValid(UInt_t mask)
Definition: TBuffer3D.h:67
Int_t * fPols
Definition: TBuffer3D.h:116
Bool_t fLocalFrame
Definition: TBuffer3D.h:92
point * points
Definition: X3DBuffer.c:20
static void PaintH3(TH1 *h, Option_t *option)
Paint 3-d histogram h with marker3dboxes.
virtual void SetLineColor(Color_t lcolor)
Definition: TAttLine.h:54
float ymax
Definition: THbookFile.cxx:93
Class to manage histogram axis.
Definition: TAxis.h:36
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition: TAxis.cxx:499
TClass * IsA() const
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
Definition: TAttFill.cxx:229
Bool_t TestBit(UInt_t f) const
Definition: TObject.h:173
TMarker * m
Definition: textangle.C:8
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
Definition: TBuffer3D.cxx:357
Generic 3D primitive description class.
Definition: TBuffer3D.h:19
TAxis * GetYaxis()
Definition: TH1.h:320
float xmax
Definition: THbookFile.cxx:93
Float_t fY
Definition: TMarker3DBox.h:49
TObject * fID
Definition: TBuffer3D.h:89
const Double_t kPI
Definition: TEllipse.cxx:22
virtual Color_t GetLineColor() const
Definition: TAttLine.h:47
Double_t Cos(Double_t)
Definition: TMath.h:424
Double_t Pi()
Definition: TMath.h:44
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TMarker3DBox & operator=(const TMarker3DBox &)
assignment operator
Float_t fTheta
Definition: TMarker3DBox.h:55
static const double x1[5]
#define ClassImp(name)
Definition: Rtypes.h:279
double Double_t
Definition: RtypesCore.h:55
Int_t fColor
Definition: TBuffer3D.h:90
Double_t y[n]
Definition: legend1.C:17
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
Definition: TAttLine.cxx:193
Float_t fPhi
Definition: TMarker3DBox.h:56
The TH1 histogram class.
Definition: TH1.h:80
TObject * fRefObject
Definition: TMarker3DBox.h:57
virtual void Paint(Option_t *option)
Paint marker 3D box.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
Definition: TView.cxx:36
Int_t GetLast() const
Return last bin on the axis i.e.
Definition: TAxis.cxx:440
Binding & operator=(OUT(*fun)(void))
TAxis * GetZaxis()
Definition: TH1.h:321
Mother of all ROOT objects.
Definition: TObject.h:58
Float_t fZ
Definition: TMarker3DBox.h:50
Int_t * fSegs
Definition: TBuffer3D.h:115
virtual Color_t GetMarkerColor() const
Definition: TAttMarker.h:44
UInt_t NbPnts() const
Definition: TBuffer3D.h:82
Double_t Sin(Double_t)
Definition: TMath.h:421
A special 3-D marker designed for event display.
Definition: TMarker3DBox.h:45
#define gPad
Definition: TVirtualPad.h:288
Short_t fTransparency
Definition: TBuffer3D.h:91
Float_t fDx
Definition: TMarker3DBox.h:51
virtual void SetPosition(Float_t x, Float_t y, Float_t z)
Set position.
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void SetSize(Float_t dx, Float_t dy, Float_t dz)
Set size.
R__EXTERN TGeometry * gGeometry
Definition: TGeometry.h:162
virtual void PadRange(Int_t rback)=0
Float_t fDz
Definition: TMarker3DBox.h:53
Line Attributes class.
Definition: TAttLine.h:32
Float_t fDy
Definition: TMarker3DBox.h:52
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TAxis * GetXaxis()
Definition: TH1.h:319
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Bool_t SectionsValid(UInt_t mask) const
Definition: TBuffer3D.h:69