mirror of https://github.com/CGAL/cgal
fix the mesh_simplification_plugin
This commit is contained in:
parent
c552dce7c6
commit
de34478f85
|
|
@ -68,8 +68,8 @@ void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
|
|||
namespace SMS = CGAL::Surface_mesh_simplification;
|
||||
SMS::Count_stop_predicate< Polyhedron > stop(nb_edges); // target #edges
|
||||
SMS::edge_collapse( *pMesh, stop,
|
||||
CGAL::vertex_index_map(boost::get(CGAL::vertex_external_index,*pMesh))
|
||||
.edge_index_map(boost::get(CGAL::edge_external_index,*pMesh)));
|
||||
CGAL::vertex_index_map(get(CGAL::vertex_external_index,*pMesh))
|
||||
.halfedge_index_map(get(CGAL::halfedge_external_index,*pMesh)));
|
||||
std::cout << "ok (" << time.elapsed() << " ms, "
|
||||
<< pMesh->size_of_halfedges() / 2 << " edges)" << std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ Input_facets_AABB_tree* get_aabb_tree(Scene_polyhedron_item* item)
|
|||
Polyhedron* poly = item->polyhedron();
|
||||
if(poly) {
|
||||
Input_facets_AABB_tree* tree =
|
||||
new Input_facets_AABB_tree(poly->facets_begin(),
|
||||
poly->facets_end(),
|
||||
new Input_facets_AABB_tree(faces(*poly).first,
|
||||
faces(*poly).second,
|
||||
*poly);
|
||||
item->setProperty(aabb_property_name,
|
||||
QVariant::fromValue<void*>(tree));
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ public:
|
|||
typedef typename GraphTraits::edges_size_type size_type ;
|
||||
|
||||
typedef typename GraphTraits::edge_iterator edge_iterator ;
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
typedef typename GetCost ::result_type Cost_type ;
|
||||
typedef typename GetPlacement::result_type Placement_type ;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ struct Edge_collapse_visitor_base
|
|||
|
||||
typedef typename GraphTraits::edges_size_type size_type ;
|
||||
typedef typename GraphTraits::vertex_descriptor vertex_descriptor ;
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
typedef typename Kernel_traits<Point>::Kernel Kernel ;
|
||||
typedef typename Kernel::FT FT ;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ public:
|
|||
typedef typename boost::graph_traits<ECM>::edge_descriptor edge_descriptor ;
|
||||
typedef typename boost::graph_traits<ECM>::edges_size_type size_type ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
typedef typename Kernel_traits<Point>::Kernel Kernel ;
|
||||
typedef typename Kernel::FT FT ;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ public:
|
|||
|
||||
private :
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
typedef typename Kernel_traits<Point>::Kernel Kernel ;
|
||||
|
||||
public :
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace CGAL {
|
|||
namespace Surface_mesh_simplification
|
||||
{
|
||||
|
||||
template<class ECM_, class Kernel_ = typename Kernel_traits< typename ECM_::Vertex::Point>::Kernel >
|
||||
template<class ECM_, class Kernel_ = typename Kernel_traits<typename boost::property_traits<typename boost::property_map<ECM_, CGAL::vertex_point_t>::type>::value_type>::Kernel >
|
||||
class LindstromTurkCore
|
||||
{
|
||||
public:
|
||||
|
|
@ -61,7 +61,8 @@ public:
|
|||
|
||||
typedef typename Kernel::Point_3 Point ;
|
||||
|
||||
typedef typename ECM::Vertex::Point ECM_Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type ECM_Point;
|
||||
|
||||
typedef typename Kernel_traits<ECM_Point>::Kernel ECM_Kernel ;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,9 @@ public:
|
|||
|
||||
typedef Edge_profile<ECM> Profile ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
typedef typename Kernel_traits<Point>::Kernel Kernel ;
|
||||
|
||||
typedef typename Kernel::FT FT ;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ public:
|
|||
typedef typename GraphTraits::vertex_descriptor vertex_descriptor ;
|
||||
typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ public:
|
|||
|
||||
typedef Edge_profile<ECM> Profile ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
typedef typename Kernel_traits<Point>::Kernel Kernel ;
|
||||
typedef typename Kernel::FT FT ;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,9 @@ public:
|
|||
|
||||
typedef Edge_profile<ECM> Profile ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
typedef optional<Point> result_type ;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -36,8 +36,9 @@ public:
|
|||
|
||||
typedef Edge_profile<ECM> Profile ;
|
||||
|
||||
typedef typename ECM::Vertex::Point Point ;
|
||||
|
||||
typedef typename boost::property_map<ECM, CGAL::vertex_point_t>::type Vertex_point_pmap;
|
||||
typedef typename boost::property_traits<Vertex_point_pmap>::value_type Point;
|
||||
|
||||
typedef optional<Point> result_type ;
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue