diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h index 905f63e68b7..6a8b2bfe329 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h @@ -159,7 +159,8 @@ public: typedef GeomTraits Geom_traits; typedef typename Geom_traits::FT FT; - typedef typename Eigen::Matrix Cost_matrix; + typedef typename internal::GarlandHeckbert_matrix_type::type Cost_matrix; typedef CGAL::dynamic_vertex_property_t Cost_property; typedef typename boost::property_map::type Vertex_cost_map; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_core.h index 58245e99ee1..240f9580076 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_core.h @@ -24,6 +24,13 @@ namespace CGAL { namespace Surface_mesh_simplification { namespace internal { +template +struct GarlandHeckbert_matrix_type +{ + typedef typename GT_::FT FT; + typedef Eigen::Matrix type; +}; + template struct GarlandHeckbert_core { @@ -43,7 +50,7 @@ struct GarlandHeckbert_core typedef typename Geom_traits::Plane_3 Plane_3; typedef typename Geom_traits::Vector_3 Vector_3; - typedef Eigen::Matrix Matrix4x4; + typedef typename GarlandHeckbert_matrix_type::type Matrix4x4; typedef Eigen::Matrix Row4; typedef Eigen::Matrix Col4; @@ -170,7 +177,7 @@ struct GarlandHeckbert_core const Geom_traits& gt, const FT discontinuity_multiplier = FT(100)) { - Matrix4x4 nq = Eigen::Matrix::Zero(); + Matrix4x4 nq = Matrix4x4::Zero(); for(vertex_descriptor v : vertices(tmesh)) put(vcm, v, nq); // @todo is that necessary ?