From f2b1e70d80675183c62e5f5d481c579c11037ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 16 Jan 2018 09:53:29 +0100 Subject: [PATCH] rename ECM -> TM in code --- .../Detail/Common.h | 32 ++--- .../Detail/Edge_collapse.h | 30 ++-- .../Detail/Edge_collapse_impl.h | 106 +++++++------- .../Edge_collapse_visitor_base.h | 14 +- .../Bounded_normal_change_placement.h | 2 +- .../Edge_collapse/Constrained_placement.h | 4 +- .../Count_ratio_stop_predicate.h | 10 +- .../Edge_collapse/Count_stop_predicate.h | 8 +- .../Detail/Lindstrom_Turk_core.h | 14 +- .../Detail/Lindstrom_Turk_core_impl.h | 130 +++++++++--------- .../Policies/Edge_collapse/Edge_length_cost.h | 6 +- .../Policies/Edge_collapse/Edge_profile.h | 18 +-- .../Edge_collapse/Edge_profile_impl.h | 14 +- .../Edge_collapse/LindstromTurk_cost.h | 8 +- .../Edge_collapse/LindstromTurk_placement.h | 6 +- .../Edge_collapse/Midpoint_placement.h | 4 +- .../edge_collapse.h | 40 +++--- .../test_edge_collapse_Polyhedron_3.cpp | 18 +-- 18 files changed, 232 insertions(+), 232 deletions(-) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Common.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Common.h index c0be7a80c6c..ff25c26f38a 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Common.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Common.h @@ -86,9 +86,9 @@ bool handle_exists ( Iterator begin, Iterator end, Handle h ) return false ; } -template +template struct No_constrained_edge_map{ - typedef typename boost::graph_traits::edge_descriptor key_type; + typedef typename boost::graph_traits::edge_descriptor key_type; typedef bool value_type; typedef value_type reference; typedef boost::readable_property_map_tag category; @@ -130,44 +130,44 @@ inline std::string optional_to_string( boost::optional const& o ) #if defined(CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE) \ || defined(CGAL_SURFACE_SIMPLIFICATION_ENABLE_LT_TRACE) -#define CGAL_ECMS_ENABLE_TRACE +#define CGAL_SMS_ENABLE_TRACE #endif -#ifdef CGAL_ECMS_ENABLE_TRACE +#ifdef CGAL_SMS_ENABLE_TRACE # include # include # include -namespace internal { namespace { bool cgal_enable_ecms_trace = true ; } } -# define CGAL_ECMS_TRACE_IMPL(m) \ - if ( ::internal::cgal_enable_ecms_trace ) { \ +namespace internal { namespace { bool cgal_enable_sms_trace = true ; } } +# define CGAL_SMS_TRACE_IMPL(m) \ + if ( ::internal::cgal_enable_sms_trace ) { \ std::ostringstream ss ; ss << m ; std::string s = ss.str(); \ /*Surface_simplification_external_trace(s)*/ std::cerr << s << std::endl; \ } -# define CGAL_ECMS_DEBUG_CODE(code) code +# define CGAL_SMS_DEBUG_CODE(code) code #else -# define CGAL_ECMS_DEBUG_CODE(code) +# define CGAL_SMS_DEBUG_CODE(code) #endif #ifdef CGAL_SURFACE_SIMPLIFICATION_ENABLE_LT_TRACE -# define CGAL_ECMS_LT_TRACE(l,m) if ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_LT_TRACE ) CGAL_ECMS_TRACE_IMPL(m) +# define CGAL_SMS_LT_TRACE(l,m) if ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_LT_TRACE ) CGAL_SMS_TRACE_IMPL(m) #else -# define CGAL_ECMS_LT_TRACE(l,m) +# define CGAL_SMS_LT_TRACE(l,m) #endif #ifdef CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE -# define CGAL_ECMS_TRACE_IF(c,l,m) if ( (c) && ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE) ) CGAL_ECMS_TRACE_IMPL(m) -# define CGAL_ECMS_TRACE(l,m) if ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE ) CGAL_ECMS_TRACE_IMPL(m) +# define CGAL_SMS_TRACE_IF(c,l,m) if ( (c) && ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE) ) CGAL_SMS_TRACE_IMPL(m) +# define CGAL_SMS_TRACE(l,m) if ( (l) <= CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE ) CGAL_SMS_TRACE_IMPL(m) #else -# define CGAL_ECMS_TRACE_IF(c,l,m) -# define CGAL_ECMS_TRACE(l,m) +# define CGAL_SMS_TRACE_IF(c,l,m) +# define CGAL_SMS_TRACE(l,m) #endif -#undef CGAL_ECMS_ENABLE_TRACE +#undef CGAL_SMS_ENABLE_TRACE #ifdef CGAL_TESTING_SURFACE_MESH_SIMPLIFICATION # define CGAL_SURF_SIMPL_TEST_assertion(EX) CGAL_assertion(EX) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h index d97e923e096..2eeea15d937 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h @@ -35,7 +35,7 @@ namespace Surface_mesh_simplification // // Implementation of the vertex-pair collapse triangulated surface mesh simplification algorithm // -template Profile ; + typedef Edge_profile Profile ; - typedef boost::graph_traits GraphTraits ; - typedef boost::graph_traits ConstGraphTraits ; + typedef boost::graph_traits GraphTraits ; + typedef boost::graph_traits ConstGraphTraits ; typedef typename GraphTraits::vertex_descriptor vertex_descriptor ; typedef typename GraphTraits::vertex_iterator vertex_iterator ; typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor ; typedef typename GraphTraits::halfedge_iterator halfedge_iterator ; - typedef CGAL::Halfedge_around_source_iterator out_edge_iterator ; - typedef CGAL::Halfedge_around_target_iterator in_edge_iterator ; + typedef CGAL::Halfedge_around_source_iterator out_edge_iterator ; + typedef CGAL::Halfedge_around_target_iterator in_edge_iterator ; typedef typename GraphTraits::traversal_category traversal_category ; typedef typename GraphTraits::edges_size_type size_type ; @@ -170,7 +170,7 @@ public: public: - EdgeCollapse( ECM& aSurface + EdgeCollapse( TM& aSurface , ShouldStop const& aShouldStop , VertexIndexMap const& aVertex_index_map , VertexPointMap const& aVertex_point_map @@ -209,7 +209,7 @@ private: return is_primary_edge(aEdge) ? aEdge : opposite(aEdge,mSurface) ; } - bool is_border ( halfedge_descriptor const& aEdge ) const { return face(aEdge,mSurface) == boost::graph_traits::null_face() ; } + bool is_border ( halfedge_descriptor const& aEdge ) const { return face(aEdge,mSurface) == boost::graph_traits::null_face() ; } bool is_constrained( halfedge_descriptor const& aEdge ) const { return get(Edge_is_constrained_map,edge(aEdge,mSurface)); } bool is_constrained( vertex_descriptor const& aVertex ) const; @@ -343,10 +343,10 @@ private: } - template + template vertex_descriptor halfedge_collapse_bk_compatibility( - halfedge_descriptor const& pq, No_constrained_edge_map ) + halfedge_descriptor const& pq, No_constrained_edge_map ) { vertex_descriptor vd = CGAL::Euler::collapse_edge(edge(pq,mSurface), mSurface); return vd; @@ -362,10 +362,10 @@ private: return is_constrained(aProfile.v0()) && is_constrained(aProfile.v1()); } - template + template bool is_edge_adjacent_to_a_constrained_edge( - halfedge_descriptor const&, No_constrained_edge_map ) + halfedge_descriptor const&, No_constrained_edge_map ) { return false; } @@ -373,7 +373,7 @@ private: private: - ECM& mSurface ; + TM& mSurface ; ShouldStop const& Should_stop ; VertexIndexMap const& Vertex_index_map ; @@ -396,7 +396,7 @@ private: FT mcMaxDihedralAngleCos2 ; - CGAL_ECMS_DEBUG_CODE ( unsigned mStep ; ) + CGAL_SMS_DEBUG_CODE ( unsigned mStep ; ) } ; } // namespace Surface_mesh_simplification diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h index e55fd0f6b4b..cd2266babd6 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse_impl.h @@ -29,7 +29,7 @@ namespace Surface_mesh_simplification { template - EdgeCollapse::EdgeCollapse( ECM& aSurface + EdgeCollapse::EdgeCollapse( TM& aSurface , ShouldStop const& aShould_stop , VertexIndexMap const& aVertex_index_map , VertexPointMap const& aVertex_point_map @@ -65,17 +65,17 @@ namespace Surface_mesh_simplification } } - CGAL_ECMS_TRACE(0,"EdgeCollapse of ECM with " << (num_edges(aSurface)/2) << " edges" ); + CGAL_SMS_TRACE(0,"EdgeCollapse of TM with " << (num_edges(aSurface)/2) << " edges" ); - CGAL_ECMS_DEBUG_CODE ( mStep = 0 ; ) + CGAL_SMS_DEBUG_CODE ( mStep = 0 ; ) #ifdef CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE vertex_iterator vb, ve ; for ( boost::tie(vb,ve) = vertices(mSurface) ; vb != ve ; ++ vb ) - CGAL_ECMS_TRACE(1, vertex_to_string(*vb) ) ; + CGAL_SMS_TRACE(1, vertex_to_string(*vb) ) ; for ( boost::tie(eb,ee) = halfedges(mSurface); eb!=ee; ++eb ) - CGAL_ECMS_TRACE(1, edge_to_string(*eb) ) ; + CGAL_SMS_TRACE(1, edge_to_string(*eb) ) ; #endif } @@ -92,7 +92,7 @@ namespace Surface_mesh_simplification // Then proceed to collapse each edge in turn Loop(); - CGAL_ECMS_TRACE(0,"Finished: " << (mInitialEdgeCount - mCurrentEdgeCount) << " edges removed." ) ; + CGAL_SMS_TRACE(0,"Finished: " << (mInitialEdgeCount - mCurrentEdgeCount) << " edges removed." ) ; int r = (int)(mInitialEdgeCount - mCurrentEdgeCount) ; @@ -104,7 +104,7 @@ namespace Surface_mesh_simplification template void EdgeCollapse::Collect() { - CGAL_ECMS_TRACE(0,"Collecting edges..."); + CGAL_SMS_TRACE(0,"Collecting edges..."); // // Loop over all the _undirected_ edges in the surface putting them in the PQ @@ -158,7 +158,7 @@ namespace Surface_mesh_simplification } - CGAL_ECMS_TRACE(2,edge_to_string(lEdge)); + CGAL_SMS_TRACE(2,edge_to_string(lEdge)); } CGAL_SURF_SIMPL_TEST_assertion ( lInserted + lNotInserted == mInitialEdgeCount ) ; @@ -179,7 +179,7 @@ namespace Surface_mesh_simplification zero_length_edges.erase( lEdge_to_remove ); Edge_data& lData = get_data(lEdge_to_remove) ; if ( lData.is_in_PQ() ){ - CGAL_ECMS_TRACE(2,"Removing E" << get(Edge_index_map,lEdge_to_remove) << " from PQ" ); + CGAL_SMS_TRACE(2,"Removing E" << get(Edge_index_map,lEdge_to_remove) << " from PQ" ); remove_from_PQ(lEdge_to_remove,lData); } --mCurrentEdgeCount; @@ -193,7 +193,7 @@ namespace Surface_mesh_simplification zero_length_edges.erase( lEdge_to_remove ); Edge_data& lData = get_data(lEdge_to_remove) ; if ( lData.is_in_PQ() ){ - CGAL_ECMS_TRACE(2,"Removing E" << get(Edge_index_map,lEdge_to_remove) << " from PQ" ); + CGAL_SMS_TRACE(2,"Removing E" << get(Edge_index_map,lEdge_to_remove) << " from PQ" ); remove_from_PQ(lEdge_to_remove,lData); } --mCurrentEdgeCount; @@ -209,13 +209,13 @@ namespace Surface_mesh_simplification Visitor.OnCollapsed(lProfile,rResult); } - CGAL_ECMS_TRACE(0,"Initial edge count: " << mInitialEdgeCount ) ; + CGAL_SMS_TRACE(0,"Initial edge count: " << mInitialEdgeCount ) ; } template void EdgeCollapse::Loop() { - CGAL_ECMS_TRACE(0,"Collapsing edges...") ; + CGAL_SMS_TRACE(0,"Collapsing edges...") ; CGAL_SURF_SIMPL_TEST_assertion_code ( size_type lLoop_watchdog = 0 ) ; CGAL_SURF_SIMPL_TEST_assertion_code ( size_type lNonCollapsableCount = 0 ) ; @@ -231,7 +231,7 @@ namespace Surface_mesh_simplification { CGAL_SURF_SIMPL_TEST_assertion ( lLoop_watchdog ++ < mInitialEdgeCount ) ; - CGAL_ECMS_TRACE(1,"Popped " << edge_to_string(*lEdge) ) ; + CGAL_SMS_TRACE(1,"Popped " << edge_to_string(*lEdge) ) ; CGAL_assertion( !is_constrained(*lEdge) ); @@ -247,7 +247,7 @@ namespace Surface_mesh_simplification { Visitor.OnStopConditionReached(lProfile); - CGAL_ECMS_TRACE(0,"Stop condition reached with InitialEdgeCount=" << mInitialEdgeCount + CGAL_SMS_TRACE(0,"Stop condition reached with InitialEdgeCount=" << mInitialEdgeCount << " CurrentEdgeCount=" << mCurrentEdgeCount << " Current Edge: " << edge_to_string(*lEdge) ); @@ -284,12 +284,12 @@ namespace Surface_mesh_simplification Visitor.OnNonCollapsable(lProfile); - CGAL_ECMS_TRACE(1,edge_to_string(*lEdge) << " NOT Collapsable" ); + CGAL_SMS_TRACE(1,edge_to_string(*lEdge) << " NOT Collapsable" ); } } else { - CGAL_ECMS_TRACE(1,edge_to_string(*lEdge) << " uncomputable cost." ); + CGAL_SMS_TRACE(1,edge_to_string(*lEdge) << " uncomputable cost." ); } } } @@ -349,23 +349,23 @@ bool EdgeCollapse::Is_collapse_topologically_vali { bool rR = true ; - CGAL_ECMS_TRACE(3,"Testing topological collapsabilty of p_q=V" << get(Vertex_index_map,aProfile.v0()) << "(%" << degree(aProfile.v0(),mSurface) << ")" + CGAL_SMS_TRACE(3,"Testing topological collapsabilty of p_q=V" << get(Vertex_index_map,aProfile.v0()) << "(%" << degree(aProfile.v0(),mSurface) << ")" << "->V" << get(Vertex_index_map,aProfile.v1()) << "(%" << degree(aProfile.v1(),mSurface) << ")" ); - CGAL_ECMS_TRACE(4, "is p_q border:" << aProfile.is_v0_v1_a_border() ); - CGAL_ECMS_TRACE(4, "is q_q border:" << aProfile.is_v1_v0_a_border() ); + CGAL_SMS_TRACE(4, "is p_q border:" << aProfile.is_v0_v1_a_border() ); + CGAL_SMS_TRACE(4, "is q_q border:" << aProfile.is_v1_v0_a_border() ); out_edge_iterator eb1, ee1 ; out_edge_iterator eb2, ee2 ; - CGAL_ECMS_TRACE(4," t=V" + CGAL_SMS_TRACE(4," t=V" << ( aProfile.left_face_exists() ? get(Vertex_index_map,aProfile.vL()) : -1 ) << "(%" << ( aProfile.left_face_exists() ? degree(aProfile.vL(),mSurface) : 0 ) << ")" ); - CGAL_ECMS_TRACE(4," b=V" + CGAL_SMS_TRACE(4," b=V" << ( aProfile.right_face_exists() ? get(Vertex_index_map,aProfile.vR()) : -1 ) << "(%" << ( aProfile.right_face_exists() ? degree(aProfile.vR(),mSurface) :0 ) @@ -453,13 +453,13 @@ bool EdgeCollapse::Is_collapse_topologically_vali if ( !lIsFace ) { - CGAL_ECMS_TRACE(3," k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ; + CGAL_SMS_TRACE(3," k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ; rR = false ; break ; } else { - CGAL_ECMS_TRACE(4," k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ; + CGAL_SMS_TRACE(4," k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ; } } } @@ -477,7 +477,7 @@ bool EdgeCollapse::Is_collapse_topologically_vali if ( Is_open_triangle(aProfile.v0_v1()) ) { rR = false ; - CGAL_ECMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ; + CGAL_SMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ; } } else if ( aProfile.is_v1_v0_a_border() ) @@ -485,7 +485,7 @@ bool EdgeCollapse::Is_collapse_topologically_vali if ( Is_open_triangle(aProfile.v1_v0()) ) { rR = false ; - CGAL_ECMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ; + CGAL_SMS_TRACE(3," p-q belongs to an open triangle. NON-COLLAPSABLE edge." ) ; } } else @@ -493,7 +493,7 @@ bool EdgeCollapse::Is_collapse_topologically_vali if ( is_border(aProfile.v0()) && is_border(aProfile.v1()) ) { rR = false ; - CGAL_ECMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ; + CGAL_SMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ; } else { @@ -504,7 +504,7 @@ bool EdgeCollapse::Is_collapse_topologically_vali if ( lTetra ) { rR = false ; - CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ; + CGAL_SMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ; } } } @@ -531,7 +531,7 @@ bool EdgeCollapse::Is_open_triangle( halfedge_des if ( next(h3,mSurface) == h1 ) { // Now check if it is open - CGAL_ECMS_TRACE(4," p-q is a border edge... checking E" << get(Edge_index_map,h2) << " and E" << get(Edge_index_map,h3) ) ; + CGAL_SMS_TRACE(4," p-q is a border edge... checking E" << get(Edge_index_map,h2) << " and E" << get(Edge_index_map,h3) ) ; rR = is_border(h2) && is_border(h3); @@ -570,7 +570,7 @@ bool EdgeCollapse::are_shared_triangles_valid( Po const double cMaxAreaRatio = 1e8 ; - CGAL_ECMS_TRACE(4," Testing validity of shared triangles:" + CGAL_SMS_TRACE(4," Testing validity of shared triangles:" << "\n p0=" << xyz_to_string(p0) << "\n p1=" << xyz_to_string(p1) << "\n p2=" << xyz_to_string(p2) << "\n p3=" << xyz_to_string(p3) << "\n e01=" << xyz_to_string(e01) << "\n e02=" << xyz_to_string(e02) << "\n e03=" << xyz_to_string(e03) << "\n n012=" << xyz_to_string(n012) << "\n n023=" << xyz_to_string(n023) @@ -580,7 +580,7 @@ bool EdgeCollapse::are_shared_triangles_valid( Po if ( larger < cMaxAreaRatio * smaller ) { FT l0123 = Traits().compute_scalar_product_3_object()(n012, n023) ; - CGAL_ECMS_TRACE(4,"\n l0123=" << n_to_string(l0123) ); + CGAL_SMS_TRACE(4,"\n l0123=" << n_to_string(l0123) ); if ( CGAL_NTS is_positive(l0123) ) { @@ -588,7 +588,7 @@ bool EdgeCollapse::are_shared_triangles_valid( Po } else { - CGAL_ECMS_TRACE(4,"\n lhs: " << n_to_string(( l0123 * l0123 ) / ( l012 * l023 )) << " <= rhs: " << mcMaxDihedralAngleCos2 ) ; + CGAL_SMS_TRACE(4,"\n lhs: " << n_to_string(( l0123 * l0123 ) / ( l012 * l023 )) << " <= rhs: " << mcMaxDihedralAngleCos2 ) ; if ( ( l0123 * l0123 ) <= mcMaxDihedralAngleCos2 * ( l012 * l023 ) ) { @@ -660,7 +660,7 @@ bool EdgeCollapse::Is_collapse_geometrically_vali - CGAL_ECMS_TRACE(3,"Testing geometrical collapsabilty of v0-v1=E" << get(Edge_index_map,aProfile.v0_v1()) ); + CGAL_SMS_TRACE(3,"Testing geometrical collapsabilty of v0-v1=E" << get(Edge_index_map,aProfile.v0_v1()) ); if ( k0 ) { // Use the current link to extract all local triangles incident to 'vx' in the collapsed mesh (which at this point doesn't exist yet) @@ -680,7 +680,7 @@ bool EdgeCollapse::Is_collapse_geometrically_vali vertex_descriptor k2 = * l ; vertex_descriptor k3 = *nx ; - CGAL_ECMS_TRACE(4," Screening link vertices k1=V" << get(Vertex_index_map,k1) << " k2=V" << get(Vertex_index_map,k2) << " k3=V" << get(Vertex_index_map,k3) ) ; + CGAL_SMS_TRACE(4," Screening link vertices k1=V" << get(Vertex_index_map,k1) << " k2=V" << get(Vertex_index_map,k2) << " k3=V" << get(Vertex_index_map,k3) ) ; halfedge_descriptor e12 = find_connection(k1,k2); halfedge_descriptor e23 = k3 != k1 ? find_connection(k2,k3) : halfedge_descriptor() ; @@ -688,11 +688,11 @@ bool EdgeCollapse::Is_collapse_geometrically_vali // If 'k1-k2-k3' are connected there will be two adjacent triangles 'k0,k1,k2' and 'k0,k2,k3' after the collapse. if ( handle_assigned(e12) && handle_assigned(e23) ) { - CGAL_ECMS_TRACE(4," Link triangles shared" ) ; + CGAL_SMS_TRACE(4," Link triangles shared" ) ; if ( !are_shared_triangles_valid( *k0, get_point(k1), get_point(k2), get_point(k3) ) ) { - CGAL_ECMS_TRACE(3," Triangles VX-V" << get(Vertex_index_map,k1) << "-V" << get(Vertex_index_map,k2) << " and VX-V" << get(Vertex_index_map,k3) << " are not geometrically valid. Collapse rejected"); + CGAL_SMS_TRACE(3," Triangles VX-V" << get(Vertex_index_map,k1) << "-V" << get(Vertex_index_map,k2) << " and VX-V" << get(Vertex_index_map,k3) << " are not geometrically valid. Collapse rejected"); rR = false ; } } @@ -705,11 +705,11 @@ bool EdgeCollapse::Is_collapse_geometrically_vali // There is indeed a triangle shared along e12 if ( handle_assigned(k4) ) { - CGAL_ECMS_TRACE(4," Found exterior link triangle shared along E" << get(Edge_index_map,e12) << " with third vertex: V" << get(Vertex_index_map,k4) ) ; + CGAL_SMS_TRACE(4," Found exterior link triangle shared along E" << get(Edge_index_map,e12) << " with third vertex: V" << get(Vertex_index_map,k4) ) ; if ( !are_shared_triangles_valid( get_point(k1), get_point(k4), get_point(k2), *k0 ) ) { - CGAL_ECMS_TRACE(3," Triangles V" << get(Vertex_index_map,k1) << "-V" << get(Vertex_index_map,k4) << " and V" << get(Vertex_index_map,k2) << "-VX are not geometrically valid. Collapse rejected"); + CGAL_SMS_TRACE(3," Triangles V" << get(Vertex_index_map,k1) << "-V" << get(Vertex_index_map,k4) << " and V" << get(Vertex_index_map,k2) << "-VX are not geometrically valid. Collapse rejected"); rR = false ; } } @@ -723,11 +723,11 @@ bool EdgeCollapse::Is_collapse_geometrically_vali // There is indeed a triangle shared along e12 if ( handle_assigned(k5) ) { - CGAL_ECMS_TRACE(4," Found exterior link triangle shared along E" << get(Edge_index_map,e23) << " with third vertex: V" << get(Vertex_index_map,k5) ) ; + CGAL_SMS_TRACE(4," Found exterior link triangle shared along E" << get(Edge_index_map,e23) << " with third vertex: V" << get(Vertex_index_map,k5) ) ; if ( !are_shared_triangles_valid( get_point(k2), get_point(k5), get_point(k3), *k0 ) ) { - CGAL_ECMS_TRACE(3," Triangles V" << get(Vertex_index_map,k2) << "-V" << get(Vertex_index_map,k5) << " and V" << get(Vertex_index_map,k3) << "-VX are not geometrically valid. Collapse rejected"); + CGAL_SMS_TRACE(3," Triangles V" << get(Vertex_index_map,k2) << "-V" << get(Vertex_index_map,k5) << " and V" << get(Vertex_index_map,k3) << "-VX are not geometrically valid. Collapse rejected"); rR = false ; } } @@ -743,7 +743,7 @@ template::Collapse( Profile const& aProfile, Placement_type aPlacement ) { - CGAL_ECMS_TRACE(1,"S" << mStep << ". Collapsing " << edge_to_string(aProfile.v0_v1()) ) ; + CGAL_SMS_TRACE(1,"S" << mStep << ". Collapsing " << edge_to_string(aProfile.v0_v1()) ) ; vertex_descriptor rResult ; @@ -764,14 +764,14 @@ void EdgeCollapse::Collapse( Profile const& aProf if ( is_constrained(lV0VL) ) //make sure a constrained edge will not disappear lV0VL=primary_edge(aProfile.v1_vL()); - CGAL_ECMS_TRACE(3,"V0VL E" << get(Edge_index_map,lV0VL) + CGAL_SMS_TRACE(3,"V0VL E" << get(Edge_index_map,lV0VL) << "(V" << get(Vertex_index_map, source(lV0VL,mSurface)) << "->V" << get(Vertex_index_map,target(lV0VL,mSurface)) << ")" ) ; Edge_data& lData = get_data(lV0VL) ; if ( lData.is_in_PQ() ) { - CGAL_ECMS_TRACE(2,"Removing E" << get(Edge_index_map,lV0VL) << " from PQ" ) ; + CGAL_SMS_TRACE(2,"Removing E" << get(Edge_index_map,lV0VL) << " from PQ" ) ; remove_from_PQ(lV0VL,lData) ; } @@ -785,21 +785,21 @@ void EdgeCollapse::Collapse( Profile const& aProf if ( is_constrained(lVRV1) ) //make sure a constrained edge will not disappear lVRV1=primary_edge(aProfile.v0_vR()); - CGAL_ECMS_TRACE(3,"V1VRE" << get(Edge_index_map,lVRV1) + CGAL_SMS_TRACE(3,"V1VRE" << get(Edge_index_map,lVRV1) << "(V" << get(Vertex_index_map, source(lVRV1,mSurface)) << "->V" << get(Vertex_index_map, target(lVRV1,mSurface)) << ")" ) ; Edge_data& lData = get_data(lVRV1) ; if ( lData.is_in_PQ() ) { - CGAL_ECMS_TRACE(2,"Removing E" << get(Edge_index_map,lVRV1) << " from PQ") ; + CGAL_SMS_TRACE(2,"Removing E" << get(Edge_index_map,lVRV1) << " from PQ") ; remove_from_PQ(lVRV1,lData) ; } -- mCurrentEdgeCount ; CGAL_SURF_SIMPL_TEST_assertion_code( -- lResultingEdgeCount ) ; } - CGAL_ECMS_TRACE(1,"Removing:\n v0v1: E" << get(Edge_index_map,aProfile.v0_v1()) << "(V" << get(Vertex_index_map,aProfile.v0()) << "->V" << get(Vertex_index_map,aProfile.v1()) << ")" ); + CGAL_SMS_TRACE(1,"Removing:\n v0v1: E" << get(Edge_index_map,aProfile.v0_v1()) << "(V" << get(Vertex_index_map,aProfile.v0()) << "->V" << get(Vertex_index_map,aProfile.v1()) << ")" ); // Perform the actuall collapse. @@ -820,17 +820,17 @@ void EdgeCollapse::Collapse( Profile const& aProf CGAL_SURF_SIMPL_TEST_assertion( mSurface.is_valid() && mSurface.is_pure_triangle() ) ; - CGAL_ECMS_TRACE(1,"V" << get(Vertex_index_map,rResult) << " kept." ) ; + CGAL_SMS_TRACE(1,"V" << get(Vertex_index_map,rResult) << " kept." ) ; #ifdef CGAL_SURFACE_SIMPLIFICATION_ENABLE_TRACE out_edge_iterator eb1, ee1 ; for ( boost::tie(eb1,ee1) = halfedges_around_source(rResult,mSurface) ; eb1 != ee1 ; ++ eb1 ) - CGAL_ECMS_TRACE(2, edge_to_string(*eb1) ) ; + CGAL_SMS_TRACE(2, edge_to_string(*eb1) ) ; #endif if ( aPlacement ) { - CGAL_ECMS_TRACE(1,"New vertex point: " << xyz_to_string(*aPlacement) ) ; + CGAL_SMS_TRACE(1,"New vertex point: " << xyz_to_string(*aPlacement) ) ; put(Vertex_point_map,rResult,*aPlacement) ; } @@ -838,13 +838,13 @@ void EdgeCollapse::Collapse( Profile const& aProf Update_neighbors(rResult) ; - CGAL_ECMS_DEBUG_CODE ( ++mStep ; ) + CGAL_SMS_DEBUG_CODE ( ++mStep ; ) } template void EdgeCollapse::Update_neighbors( vertex_descriptor const& aKeptV ) { - CGAL_ECMS_TRACE(3,"Updating cost of neighboring edges..." ) ; + CGAL_SMS_TRACE(3,"Updating cost of neighboring edges..." ) ; // // (A) Collect all edges to update their cost: all those around each vertex adjacent to the vertex kept @@ -870,7 +870,7 @@ void EdgeCollapse::Update_neighbors( vertex_descr halfedge_descriptor lEdge2 = primary_edge(*eb2) ; Edge_data& lData2 = get_data(lEdge2); - CGAL_ECMS_TRACE(4,"Inedge around V" << get(Vertex_index_map,lAdj_k) << edge_to_string(lEdge2) ) ; + CGAL_SMS_TRACE(4,"Inedge around V" << get(Vertex_index_map,lAdj_k) << edge_to_string(lEdge2) ) ; // Only edges still in the PQ needs to be updated, the other needs to be re-inserted if ( lData2.is_in_PQ() ) @@ -894,7 +894,7 @@ void EdgeCollapse::Update_neighbors( vertex_descr lData.cost() = get_cost(lProfile) ; - CGAL_ECMS_TRACE(3, edge_to_string(lEdge) << " updated in the PQ") ; + CGAL_SMS_TRACE(3, edge_to_string(lEdge) << " updated in the PQ") ; update_in_PQ(lEdge,lData); } @@ -916,7 +916,7 @@ void EdgeCollapse::Update_neighbors( vertex_descr lData.cost() = get_cost(lProfile) ; - CGAL_ECMS_TRACE(3, edge_to_string(lEdge) << " re-inserted in the PQ") ; + CGAL_SMS_TRACE(3, edge_to_string(lEdge) << " re-inserted in the PQ") ; insert_in_PQ(lEdge,lData); } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h index 5212c092cc0..5c8c51c46cb 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h @@ -31,25 +31,25 @@ namespace CGAL { namespace Surface_mesh_simplification { -template +template struct Edge_collapse_visitor_base { - typedef ECM_ ECM ; + typedef TM_ TM ; - typedef Edge_profile Profile ; + typedef Edge_profile Profile ; - typedef boost::graph_traits GraphTraits ; + typedef boost::graph_traits GraphTraits ; typedef typename GraphTraits::edges_size_type size_type ; typedef typename GraphTraits::vertex_descriptor vertex_descriptor ; - typedef typename boost::property_map::type Vertex_point_pmap; + typedef typename boost::property_map::type Vertex_point_pmap; typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel ; typedef typename Kernel::FT FT ; - void OnStarted( ECM& ) {} + void OnStarted( TM& ) {} - void OnFinished ( ECM& ) {} + void OnFinished ( TM& ) {} void OnStopConditionReached( Profile const& ) {} diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h index fad6778c1fc..67074ce1d3a 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h @@ -33,7 +33,7 @@ class Bounded_normal_change_placement { public: - typedef typename Placement::ECM ECM ; + typedef typename Placement::TM TM ; public: diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h index 799828580e8..81f97dc1741 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h @@ -49,8 +49,8 @@ public: template optional operator()( Profile const& aProfile ) const { - typedef typename Profile::ECM ECM; - typedef typename CGAL::Halfedge_around_target_iterator in_edge_iterator; + typedef typename Profile::TM TM; + typedef typename CGAL::Halfedge_around_target_iterator in_edge_iterator; in_edge_iterator eb, ee ; for ( boost::tie(eb,ee) = halfedges_around_target(aProfile.v0(),aProfile.surface_mesh()); diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index bbf56d2e790..dc2e13b4810 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -42,17 +42,17 @@ namespace Surface_mesh_simplification // // Stops when the ratio of initial to current vertex pairs is below some value. // -template +template class Count_ratio_stop_predicate { public: - typedef ECM_ ECM ; + typedef TM_ TM ; - typedef Edge_profile Profile ; + typedef Edge_profile Profile ; - typedef typename boost::graph_traits::edge_descriptor edge_descriptor ; - typedef typename boost::graph_traits::edges_size_type size_type ; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor ; + typedef typename boost::graph_traits::edges_size_type size_type ; Count_ratio_stop_predicate( double aRatio ) : mRatio(aRatio) {} diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index 126e7a923d9..0099e126d31 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -42,16 +42,16 @@ namespace Surface_mesh_simplification // // Stops when the number of edges left falls below a given number. // -template +template class Count_stop_predicate { public: - typedef ECM_ ECM ; + typedef TM_ TM ; - // typedef Edge_profile Profile ; + // typedef Edge_profile Profile ; - typedef typename boost::graph_traits::edges_size_type size_type ; + typedef typename boost::graph_traits::edges_size_type size_type ; // typedef typename Kernel::FT FT ; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h index d515d7dfee0..291c4342654 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core.h @@ -45,15 +45,15 @@ namespace CGAL { namespace Surface_mesh_simplification { - template + template class LindstromTurkCore { public: - typedef ECM_ ECM ; + typedef TM_ TM ; typedef Profile_ Profile ; - typedef boost::graph_traits GraphTraits ; + typedef boost::graph_traits GraphTraits ; typedef typename GraphTraits::vertex_descriptor vertex_descriptor ; typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor ; @@ -63,9 +63,9 @@ public: typedef typename Profile::Point Point ; typedef typename Profile::VertexPointMap Vertex_point_pmap; - typedef typename boost::property_traits::value_type ECM_Point; + typedef typename boost::property_traits::value_type TM_Point; - typedef typename Kernel_traits::Kernel ECM_Kernel ; + typedef typename Kernel_traits::Kernel TM_Kernel ; typedef typename Kernel_traits::Kernel Kernel; typedef typename Kernel::Vector_3 Vector ; @@ -164,7 +164,7 @@ private : template static optional filter_infinity ( T const& n ) { return is_finite(n) ? optional(n) : optional() ; } - ECM& surface() const { return mProfile.surface() ; } + TM& surface() const { return mProfile.surface() ; } private: @@ -184,7 +184,7 @@ private: Matrix mConstraints_A ; Vector mConstraints_b ; - Cartesian_converter convert ; + Cartesian_converter convert ; FT mSquared_cos_alpha; FT mSquared_sin_alpha; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h index 6d95847022b..95472f50957 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h @@ -36,8 +36,8 @@ namespace CGAL { namespace Surface_mesh_simplification { -template -LindstromTurkCore::LindstromTurkCore( Params const& aParams, Profile const& aProfile ) +template +LindstromTurkCore::LindstromTurkCore( Params const& aParams, Profile const& aProfile ) : mParams(aParams) ,mProfile(aProfile) @@ -57,8 +57,8 @@ LindstromTurkCore::LindstromTurkCore( Params const& aParams, Profile cons Extract_boundary_data(); } -template -void LindstromTurkCore::Extract_boundary_data() +template +void LindstromTurkCore::Extract_boundary_data() { mBdry_data.reserve(mProfile.border_edges().size()); for ( const_border_edge_iterator it = mProfile.border_edges().begin(), eit = mProfile.border_edges().end() ; it != eit ; ++ it ) @@ -76,7 +76,7 @@ void LindstromTurkCore::Extract_boundary_data() Vector v = tp - sp ; Vector n = Point_cross_product(tp,sp) ; - CGAL_ECMS_LT_TRACE(1," Boundary edge. S:" << xyz_to_string(sp) << " T:" << xyz_to_string(tp) + CGAL_SMS_LT_TRACE(1," Boundary edge. S:" << xyz_to_string(sp) << " T:" << xyz_to_string(tp) << " V:" << xyz_to_string(v) << " N:" << xyz_to_string(n) ) ; @@ -84,8 +84,8 @@ void LindstromTurkCore::Extract_boundary_data() } } -template -void LindstromTurkCore::Extract_triangle_data() +template +void LindstromTurkCore::Extract_triangle_data() { mTriangle_data.reserve(mProfile.triangles().size()); for ( const_triangle_iterator it = mProfile.triangles().begin(), eit = mProfile.triangles().end() ; it != eit ; ++ it ) @@ -103,7 +103,7 @@ void LindstromTurkCore::Extract_triangle_data() FT lNormalL = Point_cross_product(p0,p1) * (p2-ORIGIN); - CGAL_ECMS_LT_TRACE(1," Extracting triangle v" << tri.v0 << "->v" << tri.v1 << "->v" << tri.v2 + CGAL_SMS_LT_TRACE(1," Extracting triangle v" << tri.v0 << "->v" << tri.v1 << "->v" << tri.v2 << " N:" << xyz_to_string(lNormalV) << " L:" << n_to_string(lNormalL) ); @@ -111,13 +111,13 @@ void LindstromTurkCore::Extract_triangle_data() } } -template -typename LindstromTurkCore::Optional_point LindstromTurkCore::compute_placement() +template +typename LindstromTurkCore::Optional_point LindstromTurkCore::compute_placement() { Optional_point rPlacementP ; Optional_vector lPlacementV ; - CGAL_ECMS_LT_TRACE(0,"Computing LT placement for E" << mProfile.v0_v1() << " (V" << mProfile.v0() << "->V" << mProfile.v1() << ")" ); + CGAL_SMS_LT_TRACE(0,"Computing LT placement for E" << mProfile.v0_v1() << " (V" << mProfile.v0() << "->V" << mProfile.v1() << ")" ); // // Each vertex constraint is an equation of the form: Ai * v = bi @@ -164,21 +164,21 @@ typename LindstromTurkCore::Optional_point LindstromTurkCore::comp { Matrix const& lAi = *lOptional_Ai ; - CGAL_ECMS_LT_TRACE(2," b: " << xyz_to_string(mConstraints_b) ); - CGAL_ECMS_LT_TRACE(2," inv(A): " << matrix_to_string(lAi) ); + CGAL_SMS_LT_TRACE(2," b: " << xyz_to_string(mConstraints_b) ); + CGAL_SMS_LT_TRACE(2," inv(A): " << matrix_to_string(lAi) ); lPlacementV = filter_infinity(mConstraints_b * lAi) ; - CGAL_ECMS_LT_TRACE(0," New vertex point: " << xyz_to_string(*lPlacementV) ); + CGAL_SMS_LT_TRACE(0," New vertex point: " << xyz_to_string(*lPlacementV) ); } else { - CGAL_ECMS_LT_TRACE(1," Can't solve optimization, singular system."); + CGAL_SMS_LT_TRACE(1," Can't solve optimization, singular system."); } } else { - CGAL_ECMS_LT_TRACE(1," Can't solve optimization, not enough alpha-compatible constraints."); + CGAL_SMS_LT_TRACE(1," Can't solve optimization, not enough alpha-compatible constraints."); } if ( lPlacementV ) @@ -187,14 +187,14 @@ typename LindstromTurkCore::Optional_point LindstromTurkCore::comp return rPlacementP; } -template -typename LindstromTurkCore::Optional_FT LindstromTurkCore::compute_cost( Optional_point const& aP ) +template +typename LindstromTurkCore::Optional_FT LindstromTurkCore::compute_cost( Optional_point const& aP ) { Optional_FT rCost ; if ( aP ) { - CGAL_ECMS_LT_TRACE(0,"Computing LT cost for E" << mProfile.v0_v1() ); + CGAL_SMS_LT_TRACE(0,"Computing LT cost for E" << mProfile.v0_v1() ); Vector lV = (*aP) - ORIGIN ; FT lSquaredLength = squared_distance(mProfile.p0(),mProfile.p1()); @@ -209,7 +209,7 @@ typename LindstromTurkCore::Optional_FT LindstromTurkCore::compute rCost = filter_infinity(lTotalCost); - CGAL_ECMS_LT_TRACE(0, " Squared edge length: " << n_to_string(lSquaredLength) + CGAL_SMS_LT_TRACE(0, " Squared edge length: " << n_to_string(lSquaredLength) << "\n Boundary cost: " << n_to_string(lBdryCost) << " weight: " << mParams.BoundaryWeight << "\n Volume cost: " << n_to_string(lVolumeCost) << " weight: " << mParams.VolumeWeight << "\n Shape cost: " << n_to_string(lShapeCost) << " weight: " << mParams.ShapeWeight @@ -222,8 +222,8 @@ typename LindstromTurkCore::Optional_FT LindstromTurkCore::compute } -template -void LindstromTurkCore::Add_boundary_preservation_constraints( Boundary_data_vector const& aBdry ) +template +void LindstromTurkCore::Add_boundary_preservation_constraints( Boundary_data_vector const& aBdry ) { if ( aBdry.size() > 0 ) @@ -246,7 +246,7 @@ void LindstromTurkCore::Add_boundary_preservation_constraints( Boundary_d e1y = e1y + vy; e1z = e1z + vz; - CGAL_ECMS_LT_TRACE(1," vx:" << n_to_string(vx) << " vy:" << n_to_string(vy) << " vz:" << n_to_string(vz) << " e1x:" + CGAL_SMS_LT_TRACE(1," vx:" << n_to_string(vx) << " vy:" << n_to_string(vy) << " vz:" << n_to_string(vz) << " e1x:" << n_to_string(e1x) << " e1y:" << n_to_string(e1y) << " e1z:" << n_to_string(e1z) ); } @@ -254,7 +254,7 @@ void LindstromTurkCore::Add_boundary_preservation_constraints( Boundary_d Vector c = cross_product(e1,e2); - CGAL_ECMS_LT_TRACE(1 + CGAL_SMS_LT_TRACE(1 ," Adding boundary preservation constraint." << "\n SumV:" << xyz_to_string(e1) << "\n SumN:" << xyz_to_string(e2) @@ -266,10 +266,10 @@ void LindstromTurkCore::Add_boundary_preservation_constraints( Boundary_d } } -template -void LindstromTurkCore::Add_volume_preservation_constraints( Triangle_data_vector const& aTriangles ) +template +void LindstromTurkCore::Add_volume_preservation_constraints( Triangle_data_vector const& aTriangles ) { - CGAL_ECMS_LT_TRACE(1," Adding volume preservation constraint. " << aTriangles.size() << " triangles."); + CGAL_SMS_LT_TRACE(1," Adding volume preservation constraint. " << aTriangles.size() << " triangles."); Vector lSumV = NULL_VECTOR ; FT lSumL(0) ; @@ -280,18 +280,18 @@ void LindstromTurkCore::Add_volume_preservation_constraints( Triangle_dat lSumL = lSumL + it->NormalL ; } - CGAL_ECMS_LT_TRACE(1, " SumV:" << xyz_to_string(lSumV) << "\n SumL:" << n_to_string(lSumL) ); + CGAL_SMS_LT_TRACE(1, " SumV:" << xyz_to_string(lSumV) << "\n SumL:" << n_to_string(lSumL) ); Add_constraint_if_alpha_compatible(lSumV,lSumL); } -template -void LindstromTurkCore::Add_boundary_and_volume_optimization_constraints( Boundary_data_vector const& aBdry +template +void LindstromTurkCore::Add_boundary_and_volume_optimization_constraints( Boundary_data_vector const& aBdry , Triangle_data_vector const& aTriangles ) { - CGAL_ECMS_LT_TRACE(1," Adding boundary and volume optimization constraints. "); + CGAL_SMS_LT_TRACE(1," Adding boundary and volume optimization constraints. "); Matrix H = NULL_MATRIX ; Vector c = NULL_VECTOR ; @@ -308,7 +308,7 @@ void LindstromTurkCore::Add_boundary_and_volume_optimization_constraints( c = c - ( lTri.NormalL * lTri.NormalV ) ; } - CGAL_ECMS_LT_TRACE(2," Hv:" << matrix_to_string(H) << "\n cv:" << xyz_to_string(c) ) ; + CGAL_SMS_LT_TRACE(2," Hv:" << matrix_to_string(H) << "\n cv:" << xyz_to_string(c) ) ; if ( aBdry.size() > 0 ) @@ -328,7 +328,7 @@ void LindstromTurkCore::Add_boundary_and_volume_optimization_constraints( cb = cb + c ; } - CGAL_ECMS_LT_TRACE(2," Hb:" << matrix_to_string(Hb) << "\n cb:" << xyz_to_string(cb) ) ; + CGAL_SMS_LT_TRACE(2," Hb:" << matrix_to_string(Hb) << "\n cb:" << xyz_to_string(cb) ) ; // // Weighted average @@ -341,16 +341,16 @@ void LindstromTurkCore::Add_boundary_and_volume_optimization_constraints( H += lScaledBoundaryWeight * Hb ; c = c + ( lScaledBoundaryWeight * cb ) ; - CGAL_ECMS_LT_TRACE(2," H:" << matrix_to_string(H) << "\n c:" << xyz_to_string(c) ) ; - CGAL_ECMS_LT_TRACE(2," VolW:" << mParams.VolumeWeight << " BdryW:" << mParams.BoundaryWeight << " ScaledBdryW:" << lScaledBoundaryWeight ) ; + CGAL_SMS_LT_TRACE(2," H:" << matrix_to_string(H) << "\n c:" << xyz_to_string(c) ) ; + CGAL_SMS_LT_TRACE(2," VolW:" << mParams.VolumeWeight << " BdryW:" << mParams.BoundaryWeight << " ScaledBdryW:" << lScaledBoundaryWeight ) ; } Add_constraint_from_gradient(H,c); } -template -void LindstromTurkCore::Add_shape_optimization_constraints( vertex_descriptor_vector const& aLink ) +template +void LindstromTurkCore::Add_shape_optimization_constraints( vertex_descriptor_vector const& aLink ) { FT s((double)aLink.size()); @@ -364,14 +364,14 @@ void LindstromTurkCore::Add_shape_optimization_constraints( vertex_descri for( typename vertex_descriptor_vector::const_iterator it = aLink.begin(), eit = aLink.end() ; it != eit ; ++it ) c = c + (ORIGIN - get_point(*it)) ; - CGAL_ECMS_LT_TRACE(1," Adding shape optimization constraint. Shape vector: " << xyz_to_string(c) ); + CGAL_SMS_LT_TRACE(1," Adding shape optimization constraint. Shape vector: " << xyz_to_string(c) ); Add_constraint_from_gradient(H,c); } -template -typename LindstromTurkCore::FT -LindstromTurkCore::Compute_boundary_cost( Vector const& v, Boundary_data_vector const& aBdry ) +template +typename LindstromTurkCore::FT +LindstromTurkCore::Compute_boundary_cost( Vector const& v, Boundary_data_vector const& aBdry ) { FT rCost(0); for ( typename Boundary_data_vector::const_iterator it = aBdry.begin() ; it != aBdry.end() ; ++ it ) @@ -383,9 +383,9 @@ LindstromTurkCore::Compute_boundary_cost( Vector const& v, Boundary_data_ return rCost / FT(4) ; } -template -typename LindstromTurkCore::FT -LindstromTurkCore::Compute_volume_cost( Vector const& v, Triangle_data_vector const& aTriangles ) +template +typename LindstromTurkCore::FT +LindstromTurkCore::Compute_volume_cost( Vector const& v, Triangle_data_vector const& aTriangles ) { FT rCost(0); @@ -402,9 +402,9 @@ LindstromTurkCore::Compute_volume_cost( Vector const& v, Triangle_data_ve return rCost / FT(36) ; } -template -typename LindstromTurkCore::FT -LindstromTurkCore::Compute_shape_cost( Point const& p, vertex_descriptor_vector const& aLink ) +template +typename LindstromTurkCore::FT +LindstromTurkCore::Compute_shape_cost( Point const& p, vertex_descriptor_vector const& aLink ) { FT rCost(0); @@ -414,27 +414,27 @@ LindstromTurkCore::Compute_shape_cost( Point const& p, vertex_descriptor_ return rCost ; } -template -void LindstromTurkCore::Add_constraint_if_alpha_compatible( Vector const& Ai, FT const& bi ) +template +void LindstromTurkCore::Add_constraint_if_alpha_compatible( Vector const& Ai, FT const& bi ) { - CGAL_ECMS_LT_TRACE(3," Adding new constraints if alpha-compatible.\n Ai: " << xyz_to_string(Ai) << "\n bi:" << n_to_string(bi) << ")" ); + CGAL_SMS_LT_TRACE(3," Adding new constraints if alpha-compatible.\n Ai: " << xyz_to_string(Ai) << "\n bi:" << n_to_string(bi) << ")" ); FT slai = Ai*Ai ; - CGAL_ECMS_LT_TRACE(3,"\n slai: " << n_to_string(slai) << ")" ); + CGAL_SMS_LT_TRACE(3,"\n slai: " << n_to_string(slai) << ")" ); if ( is_finite(slai) ) { FT l = CGAL_NTS sqrt( slai ) ; - CGAL_ECMS_LT_TRACE(3," l: " << n_to_string(l) ); + CGAL_SMS_LT_TRACE(3," l: " << n_to_string(l) ); if ( !CGAL_NTS is_zero(l) ) { Vector Ain = Ai / l ; FT bin = bi / l ; - CGAL_ECMS_LT_TRACE(3," Ain: " << xyz_to_string(Ain) << " bin:" << n_to_string(bin) ); + CGAL_SMS_LT_TRACE(3," Ain: " << xyz_to_string(Ain) << " bin:" << n_to_string(bin) ); bool lAddIt = true ; @@ -447,7 +447,7 @@ void LindstromTurkCore::Add_constraint_if_alpha_compatible( Vector const& FT max = sla0 * slai * mSquared_cos_alpha ; - CGAL_ECMS_LT_TRACE(3," Second constraint. d01: " << n_to_string(d01) << " sla0:" << n_to_string(sla0) << " sd01:" << n_to_string(sd01) << " max:" << n_to_string(max) ); + CGAL_SMS_LT_TRACE(3," Second constraint. d01: " << n_to_string(d01) << " sla0:" << n_to_string(sla0) << " sd01:" << n_to_string(sd01) << " max:" << n_to_string(max) ); if ( sd01 > max ) lAddIt = false ; @@ -463,7 +463,7 @@ void LindstromTurkCore::Add_constraint_if_alpha_compatible( Vector const& FT min = slc01 * slai * mSquared_sin_alpha ; - CGAL_ECMS_LT_TRACE(3," Third constraint. N: " << xyz_to_string(N) << " dc012:" << n_to_string(dc012) << " slc01:" << n_to_string(slc01) + CGAL_SMS_LT_TRACE(3," Third constraint. N: " << xyz_to_string(N) << " dc012:" << n_to_string(dc012) << " slc01:" << n_to_string(slc01) << " sdc012:" << n_to_string(sdc012) << " min:" << n_to_string(min) ); if ( sdc012 <= min ) @@ -488,24 +488,24 @@ void LindstromTurkCore::Add_constraint_if_alpha_compatible( Vector const& break ; } - CGAL_ECMS_LT_TRACE(3," Accepting # " << mConstraints_n << " A:" << matrix_to_string(mConstraints_A) << " b:" << xyz_to_string(mConstraints_b) ) ; + CGAL_SMS_LT_TRACE(3," Accepting # " << mConstraints_n << " A:" << matrix_to_string(mConstraints_A) << " b:" << xyz_to_string(mConstraints_b) ) ; ++ mConstraints_n ; } else { - CGAL_ECMS_LT_TRACE(3," INCOMPATIBLE. Discarded" ) ; + CGAL_SMS_LT_TRACE(3," INCOMPATIBLE. Discarded" ) ; } } else { - CGAL_ECMS_LT_TRACE(3," l is ZERO. Discarded" ); + CGAL_SMS_LT_TRACE(3," l is ZERO. Discarded" ); } } else { - CGAL_ECMS_LT_TRACE(3," OVERFLOW. Discarded" ) ; + CGAL_SMS_LT_TRACE(3," OVERFLOW. Discarded" ) ; } } @@ -531,10 +531,10 @@ int index_of_max_component ( V const& v ) return i ; } -template -void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, Vector const& c ) +template +void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, Vector const& c ) { - CGAL_ECMS_LT_TRACE(3," Adding constraint from gradient. Current n=" << mConstraints_n ) ; + CGAL_SMS_LT_TRACE(3," Adding constraint from gradient. Current n=" << mConstraints_n ) ; CGAL_precondition(mConstraints_n >= 0 && mConstraints_n<=2 ); @@ -571,7 +571,7 @@ void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, V default : Q0 = NULL_VECTOR ; // This should never happen! } - CGAL_ECMS_LT_TRACE(3," Q0:" << xyz_to_string(Q0) ) ; + CGAL_SMS_LT_TRACE(3," Q0:" << xyz_to_string(Q0) ) ; CGAL_assertion( Q0 != NULL_VECTOR ) ; @@ -583,7 +583,7 @@ void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, V FT b1 = - ( Q0 * c ) ; FT b2 = - ( Q1 * c ) ; - CGAL_ECMS_LT_TRACE(3," Q1:" << xyz_to_string(Q1) << "\n A1: " << xyz_to_string(A1) << "\n A2:" << xyz_to_string(A2) + CGAL_SMS_LT_TRACE(3," Q1:" << xyz_to_string(Q1) << "\n A1: " << xyz_to_string(A1) << "\n A2:" << xyz_to_string(A2) << "\n b1:" << n_to_string(b1) << "\n b2:" << n_to_string(b2) ) ; Add_constraint_if_alpha_compatible(A1,b1); @@ -601,7 +601,7 @@ void LindstromTurkCore::Add_constraint_from_gradient ( Matrix const& H, V FT b2 = - ( Q * c ) ; - CGAL_ECMS_LT_TRACE(3," Q:" << xyz_to_string(Q) << "\n A2: " << xyz_to_string(A2) << "\n b2:" << n_to_string(b2) ) ; + CGAL_SMS_LT_TRACE(3," Q:" << xyz_to_string(Q) << "\n A2: " << xyz_to_string(A2) << "\n b2:" << n_to_string(b2) ) ; Add_constraint_if_alpha_compatible(A2,b2); diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h index 3809803ea03..4ed242b1b0d 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h @@ -34,14 +34,14 @@ namespace Surface_mesh_simplification // // Edge-length cost: the squared length of the collapsing edge // - template + template class Edge_length_cost { public: /* - typedef ECM_ ECM ; + typedef TM_ TM ; - typedef Edge_profile Profile ; + typedef Edge_profile Profile ; typedef typename Profile::Point Point; typedef typename Kernel_traits::Kernel Kernel ; typedef typename Kernel::FT FT ; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h index f00da28040a..1c249349ff5 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h @@ -33,21 +33,21 @@ namespace CGAL { namespace Surface_mesh_simplification { - template::type> + template::type> class Edge_profile { public: - typedef ECM_ ECM ; + typedef TM_ TM ; typedef VertexPointMap_ VertexPointMap; - typedef boost::graph_traits GraphTraits ; + typedef boost::graph_traits GraphTraits ; typedef typename GraphTraits::vertex_descriptor vertex_descriptor ; typedef typename GraphTraits::face_descriptor face_descriptor ; typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor ; - //typedef typename boost::property_map::type Vertex_point_pmap; + //typedef typename boost::property_map::type Vertex_point_pmap; typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; typedef typename Kernel::FT FT; @@ -84,7 +84,7 @@ public : ,class EdgeIdxMap > Edge_profile ( halfedge_descriptor const& aV0V1 - , ECM& aSurface + , TM& aSurface , VertexIdxMap const& aVertex_index_map , VertexPointMap const& aVertex_point_map , EdgeIdxMap const& aEdge_index_map @@ -129,8 +129,8 @@ public : halfedge_descriptor_vector const& border_edges() const { return mBorderEdges ; } - ECM& surface() const { return *mSurface ; } - ECM& surface_mesh() const { return *mSurface ; } + TM& surface() const { return *mSurface ; } + TM& surface_mesh() const { return *mSurface ; } VertexPointMap vertex_point_map() const { return mvpm ; } @@ -151,7 +151,7 @@ private: bool is_border(halfedge_descriptor e) const { - return face(e,*mSurface) == boost::graph_traits::null_face(); + return face(e,*mSurface) == boost::graph_traits::null_face(); } @@ -185,7 +185,7 @@ private: halfedge_descriptor_vector mBorderEdges ; Triangle_vector mTriangles ; - ECM* mSurface ; + TM* mSurface ; VertexPointMap mvpm; } ; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h index d757cd77e3e..e4647edaa3e 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h @@ -28,13 +28,13 @@ namespace CGAL { namespace Surface_mesh_simplification { - template + template template - Edge_profile::Edge_profile ( halfedge_descriptor const& aV0V1 - , ECM& aSurface + Edge_profile::Edge_profile ( halfedge_descriptor const& aV0V1 + , TM& aSurface , VertexIdxMap const& , VertexPointMap const& aVertex_point_map , EdgeIdxMap const& @@ -102,8 +102,8 @@ template - void Edge_profile::Extract_borders() + template + void Edge_profile::Extract_borders() { halfedge_descriptor e = mV0V1; halfedge_descriptor oe = opposite(e, surface_mesh()); @@ -135,8 +135,8 @@ template - void Edge_profile::Extract_triangles_and_link() + template + void Edge_profile::Extract_triangles_and_link() { #ifdef CGAL_SMS_EDGE_PROFILE_ALWAYS_NEED_UNIQUE_VERTEX_IN_LINK std::set vertex_already_inserted; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h index 7fd99e6f05a..095e1b643ba 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h @@ -31,15 +31,15 @@ namespace CGAL { namespace Surface_mesh_simplification { - template + template class LindstromTurk_cost { public: - typedef ECM_ ECM ; + typedef TM_ TM ; /* - typedef Edge_profile Profile ; + typedef Edge_profile Profile ; typedef typename Traits::Point_3 Point; typedef typename Traits::FT FT ; @@ -53,7 +53,7 @@ public: optional operator()( Profile const& aProfile, optional const& aPlacement ) const { - return LindstromTurkCore(mParams,aProfile).compute_cost(aPlacement) ; + return LindstromTurkCore(mParams,aProfile).compute_cost(aPlacement) ; } private: diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h index c604fb038ea..b99e061e155 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h @@ -31,12 +31,12 @@ namespace CGAL { namespace Surface_mesh_simplification { - template + template class LindstromTurk_placement { public: - typedef ECM_ ECM ; + typedef TM_ TM ; public: @@ -46,7 +46,7 @@ public: optional operator()( Profile const& aProfile) const { - return LindstromTurkCore(mParams,aProfile).compute_placement() ; + return LindstromTurkCore(mParams,aProfile).compute_placement() ; } private: diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h index a5b1fb0b316..bfaaa42bbcd 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h @@ -31,12 +31,12 @@ namespace CGAL { namespace Surface_mesh_simplification { - template + template class Midpoint_placement { public: - typedef ECM_ ECM; + typedef TM_ TM; Midpoint_placement() {} diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h index d3153630061..09db7ab2890 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h @@ -35,7 +35,7 @@ namespace CGAL { namespace Surface_mesh_simplification { -template -int edge_collapse ( ECM& aSurface +int edge_collapse ( TM& aSurface , ShouldStop const& aShould_stop // optional mesh information policies , VertexIndexMap const& aVertex_index_map // defaults to get(vertex_index,aSurface) , VertexPointMap const& aVertex_point_map // defaults to get(vertex_point,aSurface) , EdgeIndexMap const& aEdge_index_map // defaults to get(edge_index,aSurface) - , EdgeIsConstrainedMap const& aEdge_is_constrained_map // defaults to No_constrained_edge_map() + , EdgeIsConstrainedMap const& aEdge_is_constrained_map // defaults to No_constrained_edge_map() // optional strategy policies - defaults to LindstomTurk , GetCost const& aGet_cost @@ -60,7 +60,7 @@ int edge_collapse ( ECM& aSurface , Visitor aVisitor ) { - typedef EdgeCollapse< ECM + typedef EdgeCollapse< TM , ShouldStop , VertexIndexMap , VertexPointMap @@ -89,8 +89,8 @@ int edge_collapse ( ECM& aSurface struct Dummy_visitor { - template void OnStarted( ECM& ) const {} - template void OnFinished ( ECM& ) const {} + template void OnStarted( TM& ) const {} + template void OnFinished ( TM& ) const {} template void OnStopConditionReached( Profile const& ) const {} template void OnCollected( Profile const&, OFT const& ) const {} template void OnSelected( Profile const&, OFT const&, Size_type, Size_type ) const {} @@ -99,8 +99,8 @@ struct Dummy_visitor template void OnNonCollapsable(Profile const& ) const {} } ; -template -int edge_collapse ( ECM& aSurface +template +int edge_collapse ( TM& aSurface , ShouldStop const& aShould_stop , cgal_bgl_named_params const& aParams ) @@ -118,15 +118,15 @@ int edge_collapse ( ECM& aSurface ,choose_const_pmap(get_param(aParams,internal_np::vertex_index),aSurface,boost::vertex_index) ,choose_pmap(get_param(aParams,internal_np::vertex_point),aSurface,boost::vertex_point) ,choose_const_pmap(get_param(aParams,internal_np::halfedge_index),aSurface,boost::halfedge_index) - ,choose_param (get_param(aParams,internal_np::edge_is_constrained),No_constrained_edge_map()) - ,choose_param (get_param(aParams,internal_np::get_cost_policy), LindstromTurk_cost()) - ,choose_param (get_param(aParams,internal_np::get_placement_policy), LindstromTurk_placement()) + ,choose_param (get_param(aParams,internal_np::edge_is_constrained),No_constrained_edge_map()) + ,choose_param (get_param(aParams,internal_np::get_cost_policy), LindstromTurk_cost()) + ,choose_param (get_param(aParams,internal_np::get_placement_policy), LindstromTurk_placement()) ,choose_param (get_param(aParams,vis), Dummy_visitor()) ); } - template -int edge_collapse ( ECM& aSurface + template +int edge_collapse ( TM& aSurface , ShouldStop const& aShould_stop , cgal_bgl_named_params const& aParams ) @@ -144,22 +144,22 @@ int edge_collapse ( ECM& aSurface ,choose_const_pmap(get_param(aParams,internal_np::vertex_index),aSurface,boost::vertex_index) ,choose_const_pmap(get_param(aParams,internal_np::vertex_point),aSurface,boost::vertex_point) ,choose_const_pmap(get_param(aParams,internal_np::halfedge_index),aSurface,boost::halfedge_index) - ,choose_param (get_param(aParams,internal_np::edge_is_constrained),No_constrained_edge_map()) - ,choose_param (get_param(aParams,internal_np::get_cost_policy), LindstromTurk_cost()) - ,choose_param (get_param(aParams,internal_np::get_placement_policy), LindstromTurk_placement()) + ,choose_param (get_param(aParams,internal_np::edge_is_constrained),No_constrained_edge_map()) + ,choose_param (get_param(aParams,internal_np::get_cost_policy), LindstromTurk_cost()) + ,choose_param (get_param(aParams,internal_np::get_placement_policy), LindstromTurk_placement()) ,choose_param (get_param(aParams,vis), Dummy_visitor()) ); } -template -int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop ) +template +int edge_collapse ( TM& aSurface, ShouldStop const& aShould_stop ) { return edge_collapse(aSurface,aShould_stop, CGAL::parameters::halfedge_index_map(get(boost::halfedge_index,aSurface))); } - template - int edge_collapse ( ECM& aSurface, ShouldStop const& aShould_stop) + template + int edge_collapse ( TM& aSurface, ShouldStop const& aShould_stop) { return edge_collapse(aSurface,aShould_stop, CGAL::parameters::halfedge_index_map(get(boost::halfedge_index,aSurface))); } diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index f087e8bbe54..16f95f9ed65 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -123,31 +123,31 @@ public: // Constructs a flat polyhedron containing just the link of a vertex class Vertex_link_builder : public Link_builder { - Surface* mECM ; + Surface* m_tm ; Vertex_handle mV ; - Surface& ecm() { return *mECM ; } + Surface& tm() { return *m_tm ; } public: - Vertex_link_builder( Surface& aECM, Vertex_handle aV) : mECM(&aECM), mV(aV) {} + Vertex_link_builder( Surface& aTM, Vertex_handle aV) : m_tm(&aTM), mV(aV) {} void operator()( Surface::HalfedgeDS& hds ) { Builder B( hds, true); - B.begin_surface( 1 + out_degree(mV,ecm()), out_degree(mV,ecm()) ); + B.begin_surface( 1 + out_degree(mV,tm()), out_degree(mV,tm()) ); this->add_vertex(B,mV); Profile::Triangle_vector triangles ; out_edge_iterator eb, ee ; - for ( boost::tie(eb,ee) = halfedges_around_source(opposite(halfedge(mV,ecm()),ecm()),ecm()) ; eb != ee ; ++ eb ) + for ( boost::tie(eb,ee) = halfedges_around_source(opposite(halfedge(mV,tm()),tm()),tm()) ; eb != ee ; ++ eb ) { halfedge_descriptor out_edge1 = *eb ; halfedge_descriptor out_edge2 = out_edge1->opposite()->next(); - vertex_descriptor v1 = target(out_edge1,ecm()); - vertex_descriptor v2 = target(out_edge2,ecm()); + vertex_descriptor v1 = target(out_edge1,tm()); + vertex_descriptor v2 = target(out_edge2,tm()); this->add_vertex(B,v1); @@ -289,8 +289,8 @@ public : Visitor( string aTestCase ) : mTestCase(aTestCase) { -#ifdef CGAL_ECMS_TRACE_IMPL - ::internal::cgal_enable_ecms_trace = true ; +#ifdef CGAL_SMS_TRACE_IMPL + ::internal::cgal_enable_sms_trace = true ; #endif mStep = 0 ; }