From 9bc2bc123f241867c523d8749b6c1afb331b7cbd Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 6 Jul 2018 08:24:09 +0200 Subject: [PATCH] Add a get for a dynamic property map tag --- .../Intrinsic_Delaunay_Triangulation_3.h | 39 ++++++++++++++++++- ...eat_method_intrinsic_surface_mesh_test.cpp | 14 ++++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h index 096d6b3e0e9..45612c45a15 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h @@ -606,8 +606,45 @@ get(const CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangula { return CGAL::Intrinsic_Delaunay_Triangulation_3::IDT_vertex_index_property_map >(idt); } - + + +template + struct property_map, + CGAL::dynamic_vertex_property_t
> { + typedef CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3 IDT; + typedef typename property_map >::type type; + typedef type const_type; + }; + } // namespace boost + +namespace CGAL { + +template +typename boost::property_map >::const_type +get(const CGAL::dynamic_vertex_property_t
& dvp, + const CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3& idt) +{ + return get(dvp,idt.triangle_mesh()); +} + + +} // namespace CGAL + #include #endif CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H diff --git a/Heat_method_3/test/Heat_method_3/heat_method_intrinsic_surface_mesh_test.cpp b/Heat_method_3/test/Heat_method_3/heat_method_intrinsic_surface_mesh_test.cpp index 3809a23f90e..0e77c2cc185 100644 --- a/Heat_method_3/test/Heat_method_3/heat_method_intrinsic_surface_mesh_test.cpp +++ b/Heat_method_3/test/Heat_method_3/heat_method_intrinsic_surface_mesh_test.cpp @@ -20,13 +20,16 @@ typedef boost::property_map::type Halfedge_c typedef CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3 Mesh; + typedef CGAL::dynamic_vertex_property_t Vertex_distance_tag; typedef boost::property_map::type Vertex_distance_map; + typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +/* typedef CGAL::Heat_method_3::Heat_method_3 Heat_method; typedef CGAL::Heat_method_3::Heat_method_Eigen_traits_3::SparseMatrix SparseMatrix; - +*/ #if 0 void source_set_tests(Heat_method hm, const Mesh& sm) @@ -109,7 +112,10 @@ void check_no_update(const Mesh& sm, const Vertex_distance_map& original, const int main() { BaseMesh bm; - Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),bm); + Halfedge_coordinate_map hcm; + Mesh sm(bm,hcm); + + Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),sm); bool idf = false; std::ifstream in("data/pyramid0.off"); @@ -119,11 +125,7 @@ int main() return 1; } - Halfedge_coordinate_map hcm; - Mesh sm(bm,hcm); - #if 0 - //source set tests Heat_method hm(sm, vertex_distance_map, idf);