Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGraph2DPainter.h
Go to the documentation of this file.
1 // @(#)root/histpainter:$Id: TGraph2DPainter.h,v 1.00
2 // Author: Olivier Couet
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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 #ifndef ROOT_TGraph2DPainter
13 #define ROOT_TGraph2DPainter
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraph2DPainter //
19 // //
20 // helper class to draw 2D graphs //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TObject.h"
25 
26 class TGraph2D;
27 class TGraphDelaunay;
28 class TGraphDelaunay2D;
29 class TList;
30 
31 class TGraph2DPainter : public TObject {
32 
33 protected:
34 
35  Double_t *fX; //!Pointer to fGraph2D->fX
36  Double_t *fY; //!Pointer to fGraph2D->fY
37  Double_t *fZ; //!Pointer to fGraph2D->fZ
38  Double_t *fXN; //!Pointer to fDelaunay->fXN
39  Double_t *fYN; //!Pointer to fDelaunay->fYN
40  Double_t *fEX; //!Pointer to fGraph2D->fXE
41  Double_t *fEY; //!Pointer to fGraph2D->fYE
42  Double_t *fEZ; //!Pointer to fGraph2D->fZE
43  Double_t fXNmin; //!Equal to fDelaunay->fXNmin
44  Double_t fXNmax; //!Equal to fDelaunay->fXNmax
45  Double_t fYNmin; //!Equal to fDelaunay->fYNmin
46  Double_t fYNmax; //!Equal to fDelaunay->fYNmax
47  Double_t fXmin; //!
48  Double_t fXmax; //!
49  Double_t fYmin; //! fGraph2D->fHistogram limits
50  Double_t fYmax; //!
51  Double_t fZmin; //!
52  Double_t fZmax; //!
53  Int_t fNpoints; //!Equal to fGraph2D->fNpoints
54  Int_t fNdt; //!Equal to fDelaunay->fNdt
55  Int_t *fPTried; //!Pointer to fDelaunay->fPTried
56  Int_t *fNTried; //!Pointer to fDelaunay->fNTried
57  Int_t *fMTried; //!Pointer to fDelaunay->fMTried
58 
59 
60  TGraphDelaunay *fDelaunay; // Pointer to the TGraphDelaunay2D to be painted
61  TGraphDelaunay2D *fDelaunay2D; // Pointer to the TGraphDelaunay2D to be painted
62  TGraph2D *fGraph2D; // Pointer to the TGraph2D in fDelaunay
63 
64  void FindTriangles();
65  void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=0);
66  void PaintPolyMarker0(Int_t n, Double_t *x, Double_t *y);
67 
68  void PaintTriangles_old(Option_t *option);
69  void PaintTriangles_new(Option_t *option);
70 
71 public:
72 
73  TGraph2DPainter();
74  TGraph2DPainter(TGraphDelaunay *gd);
75  TGraph2DPainter(TGraphDelaunay2D *gd);
76 
77  virtual ~TGraph2DPainter();
78 
79  TList *GetContourList(Double_t contour);
80  void Paint(Option_t *option);
81  void PaintContour(Option_t *option);
82  void PaintErrors(Option_t *option);
83  void PaintPolyMarker(Option_t *option);
84  void PaintPolyLine(Option_t *option);
85  void PaintTriangles(Option_t *option);
86 
87  ClassDef(TGraph2DPainter,1) // TGraph2D painter
88 };
89 
90 #endif