1 #ifndef ALPHACOMPLEX_HH
2 #define ALPHACOMPLEX_HH
12 #include "TPolyLine.h"
14 #include "TGeoManager.h"
15 #include "TGeoVolume.h"
16 #include "TGeoMatrix.h"
21 #include "TPolyMarker3D.h"
22 #include "TGLViewer.h"
25 #include "PointCoordinates.h"
26 #include "RboxPoints.h"
27 #include "QhullError.h"
30 #include "QhullFacet.h"
31 #include "QhullFacetList.h"
32 #include "QhullFacetSet.h"
33 #include "QhullLinkedList.h"
34 #include "QhullVertex.h"
36 #include "QhullVertexSet.h"
60 AlphaComplex(
const std::vector<std::vector<double>>& points,
61 const double alpha=0.);
101 std::vector<TPolyLine*>
Polygons(
const bool fill=
false)
const;
114 void Draw(
const bool fill=
false,
115 const bool points=
false)
const;
124 void Paint(
const std::string name=
"",
125 const bool fill=
false,
126 const bool points=
false,
127 const std::vector<std::string> exts=std::vector<std::string>({
"pdf"}))
const;
142 TGeoVolume*
Polyhedron(
const std::vector<std::vector<double>>& facet,
143 TGeoHMatrix*& H)
const;
148 std::vector<std::vector<std::vector<double>>>
_facets;
std::vector< double > _areas
Array of facet areas.
Definition: AlphaComplex.hh:150
std::vector< TPolyLine * > Polygons(const bool fill=false) const
Returns an array of polygons to be drawn in ROOT (only 2D)
Definition: AlphaComplex.cc:106
const double & GetVolume() const
Returns the volume of the alpha-complex.
Definition: AlphaComplex.hh:87
void SetAlpha(const double alpha)
Returns the volume of the alpha-complex.
Definition: AlphaComplex.cc:89
const std::vector< double > & GetCellVolumeArray() const
Returns the volume of the alpha-complex.
Definition: AlphaComplex.hh:90
Computes the α-complex of a set of points.
Definition: AlphaComplex.hh:50
size_t _dim
Dimension of the space.
Definition: AlphaComplex.hh:145
Set of functions that compose the Statistics package.
Set of functions that compose the Geometry package.
std::vector< std::vector< double > > _points
Vector of N vertices.
Definition: AlphaComplex.hh:147
const size_t & GetDimension() const
Returns the dimension of the space in which the tesselation is constructed.
Definition: AlphaComplex.hh:78
double _alpha
Curvature alpha.
Definition: AlphaComplex.hh:146
double Circumradius(orgQhull::QhullFacet &facet) const
Returns the circumradius of a simplical facet.
Definition: AlphaComplex.cc:270
std::vector< std::vector< std::vector< double > > > _facets
Array of simplices.
Definition: AlphaComplex.hh:148
TGeoVolume * Polyhedron(const std::vector< std::vector< double >> &facet, TGeoHMatrix *&H) const
Returns a TGeoVolume discribing the simplex in 3D.
Definition: AlphaComplex.cc:301
double _vol
Volume of the complex.
Definition: AlphaComplex.hh:151
void Initialize()
Find the alpha-complex triangulation of the N points.
Definition: AlphaComplex.cc:42
std::vector< double > _circumradii
Array of facet circumradii.
Definition: AlphaComplex.hh:149
void Paint(const std::string name="", const bool fill=false, const bool points=false, const std::vector< std::string > exts=std::vector< std::string >({"pdf"})) const
Paints the alpha-complex onto a TCanvas and save it.
Definition: AlphaComplex.cc:239
void Draw(const bool fill=false, const bool points=false) const
Draw the alpha-complex with the requested properties.
Definition: AlphaComplex.cc:189
TGeoVolume * Polyhedra() const
Returns a parent volume that contains all of the simplices (only 3D)
Definition: AlphaComplex.cc:150
AlphaComplex & operator=(const AlphaComplex &del)
Equality operator.
Definition: AlphaComplex.cc:25
~AlphaComplex()
Destructor.
Definition: AlphaComplex.cc:40
AlphaComplex()
Default constructor, initilizes everything to 0.
Definition: AlphaComplex.cc:3
const std::vector< std::vector< double > > & GetPointArray() const
Returns the array of points on which the alpha-complex is constructed.
Definition: AlphaComplex.hh:81
const std::vector< double > & GetPoint(const size_t i) const
Returns a specific point.
Definition: AlphaComplex.hh:84