From 92ff415a8a73e60d824d82053d05fb9ae7c01385 Mon Sep 17 00:00:00 2001 From: Bastian Rieck Date: Wed, 9 Feb 2011 16:14:48 +0100 Subject: [PATCH] libpsalm: Removed parameter estimation code --- libpsalm.cpp | 37 ------------------------------------- libpsalm.h | 7 ------- 2 files changed, 44 deletions(-) diff --git a/libpsalm.cpp b/libpsalm.cpp index 0ffb23e..9ca51d9 100644 --- a/libpsalm.cpp +++ b/libpsalm.cpp @@ -130,40 +130,3 @@ bool fill_hole( int num_vertices, long* vertex_IDs, double* coordinates, double* return(result); } - -/*! -* Given a mesh input density and the desired density of the triangulated -* hole, calculates an estimate for the density parameter of Liepa's -* subdivision scheme. -* -* @param input_density Average density of the input data -* @param desired_density Desired density of triangulated hole -* -* @returns Estimated value for the alpha parameter of Liepa's subdivision -* scheme. -* -* @warning The estimation is only useful for density values < 2000. A -* density much larger than this would require separate treatment. -*/ - -namespace libpsalm -{ - -double estimate_density(double input_density, double desired_density) -{ - // Fitted parameter values with asymptotic standard error of < 3%, - // which is sufficient for most mesh data. - - double a0 = 7.63324e-07; - double a1 = -0.00710062; - double b0 = -4.70052e-07; - double b1 = 0.00573126 ; - double c0 = 2.29083; - - double x = input_density; // abbreviations so that the function is written more easily - double y = desired_density; - - return(a0*x*x+a1*x+b0*y*y+b1*y+c0); -} - -} // end of namespace "libpsalm" diff --git a/libpsalm.h b/libpsalm.h index 45ea172..1b3e649 100644 --- a/libpsalm.h +++ b/libpsalm.h @@ -10,11 +10,4 @@ bool fill_hole( int num_vertices, long* vertex_IDs, double* coordinates, double* scale_attributes, double* normals, int* num_new_vertices, double** new_coordinates, int* num_new_faces, long** new_vertex_IDs); -namespace libpsalm -{ - -double estimate_density(double input_density, double desired_density); - -} // end of namespace "libpsalm" - #endif