Class to generate a Delaunay triangulation of a 2D set of points.
Algorithm based on Triangle, a two-dimensional quality mesh generator and Delaunay triangulator from Jonathan Richard Shewchuk.
See [http://www.cs.cmu.edu/~quake/triangle.html]
Definition at line 73 of file Delaunay2D.h.
|
| Delaunay2D (int n, const double *x, const double *y, const double *z, double xmin=0, double xmax=0, double ymin=0, double ymax=0) |
| class constructor from array of data points More...
|
|
Triangles::const_iterator | begin () const |
|
Triangles::const_iterator | end () const |
|
void | FindAllTriangles () |
| Find all triangles. More...
|
|
double | Interpolate (double x, double y) |
| Return the Interpolated z value corresponding to the (x,y) point. More...
|
|
Int_t | NumberOfTriangles () const |
| return the number of triangles More...
|
|
void | SetInputPoints (int n, const double *x, const double *y, const double *z, double xmin=0, double xmax=0, double ymin=0, double ymax=0) |
| set the input points for building the graph More...
|
|
void | SetZOuterValue (double z=0.) |
| set z value to be returned for points outside the region More...
|
|
double | XMax () const |
|
double | XMin () const |
|
double | YMax () const |
|
double | YMin () const |
|
double | ZOuterValue () const |
| return the user defined Z-outer value More...
|
|
#include <Math/Delaunay2D.h>
ROOT::Math::Delaunay2D::Delaunay2D |
( |
int |
n, |
|
|
const double * |
x, |
|
|
const double * |
y, |
|
|
const double * |
z, |
|
|
double |
xmin = 0 , |
|
|
double |
xmax = 0 , |
|
|
double |
ymin = 0 , |
|
|
double |
ymax = 0 |
|
) |
| |
class constructor from array of data points
Definition at line 34 of file Delaunay2D.cxx.
ROOT::Math::Delaunay2D::Delaunay2D |
( |
const Delaunay2D & |
| ) |
|
|
private |
Triangles::const_iterator ROOT::Math::Delaunay2D::begin |
( |
| ) |
const |
|
inline |
unsigned int ROOT::Math::Delaunay2D::Cell |
( |
UInt_t |
x, |
|
|
UInt_t |
y |
|
) |
| const |
|
inlineprotected |
grid cells with containing triangles
Definition at line 276 of file Delaunay2D.h.
int ROOT::Math::Delaunay2D::CellX |
( |
double |
x | ) |
const |
|
inlineprotected |
int ROOT::Math::Delaunay2D::CellY |
( |
double |
y | ) |
const |
|
inlineprotected |
void ROOT::Math::Delaunay2D::DoFindTriangles |
( |
| ) |
|
|
private |
internal function to find the triangle use Triangle or CGAL if flag is set
Triangle implementation for finding all the triangles.
Definition at line 255 of file Delaunay2D.cxx.
double ROOT::Math::Delaunay2D::DoInterpolateNormalized |
( |
double |
xx, |
|
|
double |
yy |
|
) |
| |
|
private |
internal method to compute the interpolation
Triangle implementation for interpolation Finds the Delaunay triangle that the point (xi,yi) sits in (if any) and calculate a z-value for it by linearly interpolating the z-values that make up that triangle.
Definition at line 378 of file Delaunay2D.cxx.
void ROOT::Math::Delaunay2D::DoNormalizePoints |
( |
| ) |
|
|
private |
internal function to normalize the points
Triangle implementation for normalizing the points.
Definition at line 243 of file Delaunay2D.cxx.
Triangles::const_iterator ROOT::Math::Delaunay2D::end |
( |
| ) |
const |
|
inline |
void ROOT::Math::Delaunay2D::FindAllTriangles |
( |
| ) |
|
double ROOT::Math::Delaunay2D::Interpolate |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Return the Interpolated z value corresponding to the (x,y) point.
Definition at line 103 of file Delaunay2D.cxx.
double ROOT::Math::Delaunay2D::Linear_transform |
( |
double |
x, |
|
|
double |
offset, |
|
|
double |
factor |
|
) |
| |
|
inlineprivate |
Int_t ROOT::Math::Delaunay2D::NumberOfTriangles |
( |
| ) |
const |
|
inline |
return the number of triangles
Definition at line 104 of file Delaunay2D.h.
void ROOT::Math::Delaunay2D::SetInputPoints |
( |
int |
n, |
|
|
const double * |
x, |
|
|
const double * |
y, |
|
|
const double * |
z, |
|
|
double |
xmin = 0 , |
|
|
double |
xmax = 0 , |
|
|
double |
ymin = 0 , |
|
|
double |
ymax = 0 |
|
) |
| |
set the input points for building the graph
set the input points
Definition at line 58 of file Delaunay2D.cxx.
void ROOT::Math::Delaunay2D::SetZOuterValue |
( |
double |
z = 0. | ) |
|
|
inline |
set z value to be returned for points outside the region
Definition at line 112 of file Delaunay2D.h.
double ROOT::Math::Delaunay2D::XMax |
( |
| ) |
const |
|
inline |
double ROOT::Math::Delaunay2D::XMin |
( |
| ) |
const |
|
inline |
double ROOT::Math::Delaunay2D::YMax |
( |
| ) |
const |
|
inline |
double ROOT::Math::Delaunay2D::YMin |
( |
| ) |
const |
|
inline |
double ROOT::Math::Delaunay2D::ZOuterValue |
( |
| ) |
const |
|
inline |
return the user defined Z-outer value
Definition at line 115 of file Delaunay2D.h.
inverse denominator to calculate X cell = fNCells / (fYNmax - fYNmin)
Definition at line 274 of file Delaunay2D.h.
Bool_t ROOT::Math::Delaunay2D::fInit |
|
protected |
Height for points lying outside the convex hull.
Definition at line 181 of file Delaunay2D.h.
const int ROOT::Math::Delaunay2D::fNCells = 25 |
|
staticprotected |
Int_t ROOT::Math::Delaunay2D::fNdt |
|
protected |
Int_t ROOT::Math::Delaunay2D::fNpoints |
|
protected |
Number of Delaunay triangles found.
Definition at line 153 of file Delaunay2D.h.
double ROOT::Math::Delaunay2D::fOffsetX |
|
protected |
double ROOT::Math::Delaunay2D::fOffsetY |
|
protected |
double ROOT::Math::Delaunay2D::fScaleFactorX |
|
protected |
double ROOT::Math::Delaunay2D::fScaleFactorY |
|
protected |
True if FindAllTriangels() has been performed.
Definition at line 185 of file Delaunay2D.h.
const double* ROOT::Math::Delaunay2D::fX |
|
protected |
double ROOT::Math::Delaunay2D::fXCellStep |
|
protected |
number of cells to divide the normalized space
Definition at line 272 of file Delaunay2D.h.
std::vector<double> ROOT::Math::Delaunay2D::fXN |
|
protected |
double ROOT::Math::Delaunay2D::fXNmax |
|
protected |
double ROOT::Math::Delaunay2D::fXNmin |
|
protected |
const double* ROOT::Math::Delaunay2D::fY |
|
protected |
Pointer to X array (managed externally)
Definition at line 156 of file Delaunay2D.h.
double ROOT::Math::Delaunay2D::fYCellStep |
|
protected |
inverse denominator to calculate X cell = fNCells / (fXNmax - fXNmin)
Definition at line 273 of file Delaunay2D.h.
std::vector<double> ROOT::Math::Delaunay2D::fYN |
|
protected |
double ROOT::Math::Delaunay2D::fYNmax |
|
protected |
double ROOT::Math::Delaunay2D::fYNmin |
|
protected |
const double* ROOT::Math::Delaunay2D::fZ |
|
protected |
double ROOT::Math::Delaunay2D::fZout |
|
protected |
The documentation for this class was generated from the following files: