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 71 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...
|
|
|
unsigned int | Cell (UInt_t x, UInt_t y) const |
| grid cells with containing triangles More...
|
|
int | CellX (double x) const |
|
int | CellY (double y) const |
|
#include <Math/Delaunay2D.h>
◆ Triangles
◆ Delaunay2D() [1/2]
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.
◆ Delaunay2D() [2/2]
ROOT::Math::Delaunay2D::Delaunay2D |
( |
const Delaunay2D & |
| ) |
|
|
private |
◆ begin()
Triangles::const_iterator ROOT::Math::Delaunay2D::begin |
( |
| ) |
const |
|
inline |
◆ Cell()
unsigned int ROOT::Math::Delaunay2D::Cell |
( |
UInt_t |
x, |
|
|
UInt_t |
y |
|
) |
| const |
|
inlineprotected |
grid cells with containing triangles
Definition at line 274 of file Delaunay2D.h.
◆ CellX()
int ROOT::Math::Delaunay2D::CellX |
( |
double |
x | ) |
const |
|
inlineprotected |
◆ CellY()
int ROOT::Math::Delaunay2D::CellY |
( |
double |
y | ) |
const |
|
inlineprotected |
◆ DoFindTriangles()
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 256 of file Delaunay2D.cxx.
◆ DoInterpolateNormalized()
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 379 of file Delaunay2D.cxx.
◆ DoNormalizePoints()
void ROOT::Math::Delaunay2D::DoNormalizePoints |
( |
| ) |
|
|
private |
internal function to normalize the points
Triangle implementation for normalizing the points.
Definition at line 244 of file Delaunay2D.cxx.
◆ end()
Triangles::const_iterator ROOT::Math::Delaunay2D::end |
( |
| ) |
const |
|
inline |
◆ FindAllTriangles()
void ROOT::Math::Delaunay2D::FindAllTriangles |
( |
| ) |
|
◆ Interpolate()
double ROOT::Math::Delaunay2D::Interpolate |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Return the Interpolated z value corresponding to the (x,y) point.
Definition at line 104 of file Delaunay2D.cxx.
◆ Linear_transform()
double ROOT::Math::Delaunay2D::Linear_transform |
( |
double |
x, |
|
|
double |
offset, |
|
|
double |
factor |
|
) |
| |
|
inlineprivate |
◆ NumberOfTriangles()
Int_t ROOT::Math::Delaunay2D::NumberOfTriangles |
( |
| ) |
const |
|
inline |
return the number of triangles
Definition at line 102 of file Delaunay2D.h.
◆ operator=()
◆ SetInputPoints()
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 59 of file Delaunay2D.cxx.
◆ SetZOuterValue()
void ROOT::Math::Delaunay2D::SetZOuterValue |
( |
double |
z = 0. | ) |
|
|
inline |
set z value to be returned for points outside the region
Definition at line 110 of file Delaunay2D.h.
◆ XMax()
double ROOT::Math::Delaunay2D::XMax |
( |
| ) |
const |
|
inline |
◆ XMin()
double ROOT::Math::Delaunay2D::XMin |
( |
| ) |
const |
|
inline |
◆ YMax()
double ROOT::Math::Delaunay2D::YMax |
( |
| ) |
const |
|
inline |
◆ YMin()
double ROOT::Math::Delaunay2D::YMin |
( |
| ) |
const |
|
inline |
◆ ZOuterValue()
double ROOT::Math::Delaunay2D::ZOuterValue |
( |
| ) |
const |
|
inline |
return the user defined Z-outer value
Definition at line 113 of file Delaunay2D.h.
◆ fCells
std::set<UInt_t> ROOT::Math::Delaunay2D::fCells[(fNCells+1) *(fNCells+1)] |
|
protected |
inverse denominator to calculate X cell = fNCells / (fYNmax - fYNmin)
Definition at line 272 of file Delaunay2D.h.
◆ fInit
Bool_t ROOT::Math::Delaunay2D::fInit |
|
protected |
Height for points lying outside the convex hull.
Definition at line 179 of file Delaunay2D.h.
◆ fNCells
const int ROOT::Math::Delaunay2D::fNCells = 25 |
|
staticprotected |
◆ fNdt
Int_t ROOT::Math::Delaunay2D::fNdt |
|
protected |
◆ fNpoints
Int_t ROOT::Math::Delaunay2D::fNpoints |
|
protected |
Number of Delaunay triangles found.
Definition at line 151 of file Delaunay2D.h.
◆ fOffsetX
double ROOT::Math::Delaunay2D::fOffsetX |
|
protected |
◆ fOffsetY
double ROOT::Math::Delaunay2D::fOffsetY |
|
protected |
◆ fScaleFactorX
double ROOT::Math::Delaunay2D::fScaleFactorX |
|
protected |
◆ fScaleFactorY
double ROOT::Math::Delaunay2D::fScaleFactorY |
|
protected |
◆ fTriangles
True if FindAllTriangels() has been performed.
Definition at line 183 of file Delaunay2D.h.
◆ fX
const double* ROOT::Math::Delaunay2D::fX |
|
protected |
◆ fXCellStep
double ROOT::Math::Delaunay2D::fXCellStep |
|
protected |
number of cells to divide the normalized space
Definition at line 270 of file Delaunay2D.h.
◆ fXN
std::vector<double> ROOT::Math::Delaunay2D::fXN |
|
protected |
◆ fXNmax
double ROOT::Math::Delaunay2D::fXNmax |
|
protected |
◆ fXNmin
double ROOT::Math::Delaunay2D::fXNmin |
|
protected |
◆ fY
const double* ROOT::Math::Delaunay2D::fY |
|
protected |
Pointer to X array (managed externally)
Definition at line 154 of file Delaunay2D.h.
◆ fYCellStep
double ROOT::Math::Delaunay2D::fYCellStep |
|
protected |
inverse denominator to calculate X cell = fNCells / (fXNmax - fXNmin)
Definition at line 271 of file Delaunay2D.h.
◆ fYN
std::vector<double> ROOT::Math::Delaunay2D::fYN |
|
protected |
◆ fYNmax
double ROOT::Math::Delaunay2D::fYNmax |
|
protected |
◆ fYNmin
double ROOT::Math::Delaunay2D::fYNmin |
|
protected |
◆ fZ
const double* ROOT::Math::Delaunay2D::fZ |
|
protected |
◆ fZout
double ROOT::Math::Delaunay2D::fZout |
|
protected |
The documentation for this class was generated from the following files: