Logo ROOT   6.10/09
Reference Guide
TGraphDelaunay2D.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id: TGraphDelaunay2D.h,v 1.00
2 // Author: Olivier Couet, Luke Jones (Royal Holloway, University of London)
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_TGraphDelaunay2D
13 #define ROOT_TGraphDelaunay2D
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraphDelaunay2D //
19 // //
20 // This class uses the Delaunay triangles technique to interpolate and //
21 // render the data set. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TNamed.h"
26 
27 #include "Math/Delaunay2D.h"
28 
29 class TGraph2D;
30 class TView;
31 
32 class TGraphDelaunay2D : public TNamed {
33 
34 public:
35 
36 
37 private:
38  TGraphDelaunay2D(const TGraphDelaunay2D&); // Not implemented
39  TGraphDelaunay2D& operator=(const TGraphDelaunay2D&); // Not implemented
40 
41 protected:
42 
43  TGraph2D *fGraph2D; ///<!2D graph containing the user data
44  ROOT::Math::Delaunay2D fDelaunay; ///<! Delaunay interpolator class
45 
46 public:
47 
49 
50  TGraphDelaunay2D(TGraph2D *g = 0);
51 
52  Double_t ComputeZ(Double_t x, Double_t y) { return fDelaunay.Interpolate(x,y); }
53  void FindAllTriangles() { fDelaunay.FindAllTriangles(); }
54 
55  TGraph2D *GetGraph2D() const {return fGraph2D;}
56  Double_t GetMarginBinsContent() const {return fDelaunay.ZOuterValue();}
57  Int_t GetNdt() const {return fDelaunay.NumberOfTriangles(); }
58  Double_t GetXNmin() const {return fDelaunay.XMin();}
59  Double_t GetXNmax() const {return fDelaunay.XMax();}
60  Double_t GetYNmin() const {return fDelaunay.YMin();}
61  Double_t GetYNmax() const {return fDelaunay.YMax();}
62 
63  void SetMarginBinsContent(Double_t z=0.) { fDelaunay.SetZOuterValue(z); }
64 
65  Triangles::const_iterator begin() const { return fDelaunay.begin(); }
66  Triangles::const_iterator end() const { return fDelaunay.end(); }
67 
68  ClassDef(TGraphDelaunay2D,1) // Delaunay triangulation
69 
70 private:
71 
72 
73 };
74 
75 #endif
TGraph2D * GetGraph2D() const
void SetMarginBinsContent(Double_t z=0.)
std::vector< Triangle > Triangles
Definition: Delaunay2D.h:85
See TView3D.
Definition: TView.h:25
ROOT::Math::Delaunay2D fDelaunay
! Delaunay interpolator class
int Int_t
Definition: RtypesCore.h:41
double XMax() const
Definition: Delaunay2D.h:105
TGraphDelaunay2D & operator=(const TGraphDelaunay2D &)
void FindAllTriangles()
Find all triangles.
Definition: Delaunay2D.cxx:128
Double_t GetYNmax() const
void SetZOuterValue(double z=0.)
set z value to be returned for points outside the region
Definition: Delaunay2D.h:110
Double_t ComputeZ(Double_t x, Double_t y)
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:297
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Double_t GetXNmax() const
Double_t GetXNmin() const
Triangles::const_iterator begin() const
Definition: Delaunay2D.h:116
Triangles::const_iterator end() const
Int_t GetNdt() const
Double_t GetMarginBinsContent() const
Triangles::const_iterator begin() const
double YMax() const
Definition: Delaunay2D.h:107
TGraph2D * fGraph2D
!2D graph containing the user data
double Double_t
Definition: RtypesCore.h:55
ROOT::Math::Delaunay2D::Triangles Triangles
Double_t y[n]
Definition: legend1.C:17
TGraphDelaunay2D generates a Delaunay triangulation of a TGraph2D.
double ZOuterValue() const
return the user defined Z-outer value
Definition: Delaunay2D.h:113
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
double YMin() const
Definition: Delaunay2D.h:106
Int_t NumberOfTriangles() const
return the number of triangles
Definition: Delaunay2D.h:102
double XMin() const
Definition: Delaunay2D.h:104
Double_t GetYNmin() const
Class to generate a Delaunay triangulation of a 2D set of points.
Definition: Delaunay2D.h:71
Triangles::const_iterator end() const
Definition: Delaunay2D.h:117
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition: TGraph2D.h:40
double Interpolate(double x, double y)
Return the Interpolated z value corresponding to the (x,y) point.
Definition: Delaunay2D.cxx:104
TGraphDelaunay2D(const TGraphDelaunay2D &)