diff --git a/src/meshlabplugins/filter_qhull/filter_qhull.cpp b/src/meshlabplugins/filter_qhull/filter_qhull.cpp
index 204314a2d..230dfbe55 100644
--- a/src/meshlabplugins/filter_qhull/filter_qhull.cpp
+++ b/src/meshlabplugins/filter_qhull/filter_qhull.cpp
@@ -44,7 +44,6 @@ QhullPlugin::QhullPlugin()
{
typeList = {
FP_QHULL_CONVEX_HULL,
- FP_QHULL_DELAUNAY_TRIANGULATION,
FP_QHULL_VORONOI_FILTERING,
FP_QHULL_ALPHA_COMPLEX_AND_SHAPE,
FP_QHULL_VISIBLE_POINTS
@@ -69,7 +68,6 @@ QString QhullPlugin::filterName(ActionIDType filterId) const
{
switch(filterId) {
case FP_QHULL_CONVEX_HULL : return QString("Convex Hull");
- case FP_QHULL_DELAUNAY_TRIANGULATION : return QString("Delaunay Triangulation");
case FP_QHULL_VORONOI_FILTERING : return QString("Voronoi Filtering");
case FP_QHULL_ALPHA_COMPLEX_AND_SHAPE : return QString("Alpha Complex/Shape");
case FP_QHULL_VISIBLE_POINTS: return QString("Select Visible Points");
@@ -85,9 +83,6 @@ QString QhullPlugin::filterInfo(ActionIDType filterId) const
switch(filterId) {
case FP_QHULL_CONVEX_HULL : return QString("Calculate the convex hull with Qhull library (http://www.qhull.org/html/qconvex.htm).
"
"The convex hull of a set of points is the boundary of the minimal convex set containing the given non-empty finite set of points.");
- case FP_QHULL_DELAUNAY_TRIANGULATION : return QString("Calculate the Delaunay triangulation with Qhull library (http://www.qhull.org/html/qdelaun.htm).
"
- "The Delaunay triangulation DT(P) of a set of points P in d-dimensional spaces is a triangulation of the convex hull "
- "such that no point in P is inside the circum-sphere of any simplex in DT(P).
");
case FP_QHULL_VORONOI_FILTERING : return QString("Compute a Voronoi filtering (Amenta and Bern 1998) with Qhull library (http://www.qhull.org/).
"
"The algorithm calculates a triangulation of the input point cloud without requiring vertex normals."
"It uses a subset of the Voronoi vertices to remove triangles from the Delaunay triangulation.
"
@@ -117,7 +112,6 @@ QhullPlugin::FilterClass QhullPlugin::getClass(const QAction *a) const
switch(ID(a))
{
case FP_QHULL_CONVEX_HULL :
- case FP_QHULL_DELAUNAY_TRIANGULATION :
case FP_QHULL_VORONOI_FILTERING :
case FP_QHULL_ALPHA_COMPLEX_AND_SHAPE:
return FilterClass (FilterPlugin::Remeshing) ;
@@ -144,10 +138,6 @@ RichParameterList QhullPlugin::initParameterList(const QAction *action,const Mes
//parlst.addParam(RichBool("reorient", false,"Re-orient all faces coherentely","Re-orient all faces coherentely"));
break;
}
- case FP_QHULL_DELAUNAY_TRIANGULATION :
- {
- break;
- }
case FP_QHULL_VORONOI_FILTERING :
{
parlst.addParam(RichDynamicFloat("threshold",10.0f, 0.0f, 2000.0f,"Pole Discard Thr",
@@ -223,84 +213,6 @@ std::map QhullPlugin::applyFilter(
if (!result)
throw MLException("Failed computing convex hull.");
} break;
- case FP_QHULL_DELAUNAY_TRIANGULATION:
- {
- MeshModel &m=*md.mm();
- MeshModel &pm =*md.addNewMesh("","Delaunay Triangulation");
-
- m.clearDataMask(MeshModel::MM_WEDGTEXCOORD);
- m.clearDataMask(MeshModel::MM_VERTTEXCOORD);
-
- int dim= 3; /* dimension of points */
- int numpoints= m.cm.vn; /* number of mesh vertices */
-
- // facet_list contains the Delaunauy triangulation as a list of tetrahedral facets
- bool result = compute_delaunay(qh, dim,numpoints,m);
-
- if (result) {
-
- setT* vertices = qh_facetvertices (qh, qh->facet_list, NULL, false);
- int convexNumVert = qh_setsize(qh, vertices);
- assert( qh->num_vertices == convexNumVert);
-
- tri::Allocator::AddVertices(pm.cm,convexNumVert);
-
- vector::VertexPointer> ivp(qh->num_vertices);
- vertexT *vertex;
- int i=0;
- FORALLvertices{
- if ((*vertex).point){
- pm.cm.vert[i].P()[0] = (*vertex).point[0];
- pm.cm.vert[i].P()[1] = (*vertex).point[1];
- pm.cm.vert[i].P()[2] = (*vertex).point[2];
- ivp[qh_pointid(qh, vertex->point)] = &pm.cm.vert[i];
- i++;
- }
- }
-
- // In 3-d Delaunay triangulation each facet is a tetrahedron. If triangulated,
- //each ridge (d-1 vertices between two neighboring facets) is a triangle.
-
- facetT *facet, *neighbor;
- qh->visit_id++;
- int ridgeCount=0;
-
- //Compute each ridge (triangle) once
- FORALLfacets
- if (!facet->upperdelaunay) {
- facet->visitid = qh->visit_id;
- qh_makeridges(qh, facet);
- ridgeT *ridge, **ridgep;
- FOREACHridge_(facet->ridges) {
- neighbor= otherfacet_(ridge, facet);
- if (neighbor->visitid != qh->visit_id) {
- tri::Allocator::FaceIterator fi=tri::Allocator::AddFaces(pm.cm,1);
- ridgeCount++;
- int vertex_n, vertex_i;
- FOREACHvertex_i_(qh, ridge->vertices)
- (*fi).V(vertex_i)= ivp[qh_pointid(qh, vertex->point)];
- }
- }
- }
-
- assert(pm.cm.fn == ridgeCount);
- log("Successfully created a mesh of %i vert and %i faces",pm.cm.vn,pm.cm.fn);
- //m.cm.Clear();
-
- //vcg::tri::UpdateBounding::Box(pm.cm);
- //vcg::tri::UpdateNormal::PerVertexNormalizedPerFace(pm.cm);
- pm.updateBoxAndNormals();
-
- int curlong, totlong; /* memory remaining after qh_memfreeshort */
- qh_freeqhull(qh, !qh_ALL);
- qh_memfreeshort (qh, &curlong, &totlong);
- if (curlong || totlong)
- fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
- totlong, curlong);
- }
- else
- throw MLException("Failed computing delaunay triangulation.");
- } break;
case FP_QHULL_VORONOI_FILTERING:
{
MeshModel &m=*md.mm();
diff --git a/src/meshlabplugins/filter_qhull/filter_qhull.h b/src/meshlabplugins/filter_qhull/filter_qhull.h
index 5ed01bb3e..87f49f99d 100644
--- a/src/meshlabplugins/filter_qhull/filter_qhull.h
+++ b/src/meshlabplugins/filter_qhull/filter_qhull.h
@@ -46,7 +46,6 @@ public:
enum {
FP_QHULL_CONVEX_HULL,
- FP_QHULL_DELAUNAY_TRIANGULATION,
FP_QHULL_VORONOI_FILTERING,
FP_QHULL_ALPHA_COMPLEX_AND_SHAPE,
FP_QHULL_VISIBLE_POINTS