From c7d21d14faee3c5cfeeb3ec43ed0d8efa98ec9b9 Mon Sep 17 00:00:00 2001 From: Amir Vaxman Date: Mon, 6 Nov 2017 16:56:13 +0100 Subject: [PATCH] added projection function typedef. Former-commit-id: d10e9721470189bd56fb934277dc2308d60fc155 --- include/igl/shapeup_local_projections.h | 2 ++ tutorial/801_ShapeUp/main.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/igl/shapeup_local_projections.h b/include/igl/shapeup_local_projections.h index bb0394ff9..b314aa51c 100644 --- a/include/igl/shapeup_local_projections.h +++ b/include/igl/shapeup_local_projections.h @@ -26,6 +26,8 @@ namespace igl //the projection assumes that the sets are vertices of polygons in order IGL_INLINE bool shapeup_regular_face_projection(const Eigen::PlainObjectBase& P, const Eigen::PlainObjectBase& SC, const Eigen::PlainObjectBase& S, Eigen::PlainObjectBase& projP); + typedef std::function&, const Eigen::PlainObjectBase&, const Eigen::PlainObjectBase&, Eigen::PlainObjectBase&)> shapeup_projection_function; + } #ifndef IGL_STATIC_LIBRARY diff --git a/tutorial/801_ShapeUp/main.cpp b/tutorial/801_ShapeUp/main.cpp index 4e27d6049..29a6bbff6 100755 --- a/tutorial/801_ShapeUp/main.cpp +++ b/tutorial/801_ShapeUp/main.cpp @@ -64,7 +64,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier) VectorXd angleRegularity(FQC.rows()); quadAngleRegularity( VQC, FQC, angleRegularity); MatrixXd Ct; - igl::jet(angleRegularity, 0.0, 0.1, Ct); + igl::jet(angleRegularity, 0.0, 0.05, Ct); MatrixXd C(FQCtri.rows(),3); C << Ct, Ct; viewer.data.set_colors(C); @@ -87,7 +87,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier) VectorXd angleRegularity(FQC.rows()); quadAngleRegularity( VQCregular, FQC, angleRegularity); MatrixXd Ct; - igl::jet(angleRegularity, 0, 0.1, Ct); + igl::jet(angleRegularity, 0, 0.05, Ct); MatrixXd C(FQCtri.rows(),3); C << Ct, Ct; viewer.data.set_colors(C); @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) MatrixXd bc(1,3); bc<&, const Eigen::PlainObjectBase&, const Eigen::PlainObjectBase&, Eigen::PlainObjectBase&)> localFunction(igl::shapeup_regular_face_projection); + igl::shapeup_projection_function localFunction(igl::shapeup_regular_face_projection); su_data.maxIterations=200; shapeup_precomputation(VQC, array_of_fours,FQC,E,b,wShape, wSmooth,su_data);