the notion of border for a halfedge is not encoded using a property map

This commit is contained in:
Sébastien Loriot 2014-07-21 22:30:14 +02:00
parent da77e0d819
commit 0b8314e28d
5 changed files with 1 additions and 94 deletions

View File

@ -250,14 +250,6 @@ namespace CGAL {
return Params(p, *this); return Params(p, *this);
} }
template <typename IsBorderMap>
cgal_bgl_named_params<IsBorderMap, halfedge_is_border_t, self>
halfedge_is_border_map(const IsBorderMap& p) const
{
typedef cgal_bgl_named_params<IsBorderMap, halfedge_is_border_t, self> Params;
return Params(p, *this);
}
template <typename Visitor> template <typename Visitor>
cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self> cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self>
visitor(const Visitor& p) const visitor(const Visitor& p) const
@ -376,15 +368,7 @@ namespace CGAL {
typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t> Params; typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t> Params;
return Params(pmap); return Params(pmap);
} }
template <typename IsBorderMap>
cgal_bgl_named_params<IsBorderMap, halfedge_is_border_t>
halfedge_is_border_map(IsBorderMap const& p)
{
typedef cgal_bgl_named_params<IsBorderMap, halfedge_is_border_t> Params;
return Params(p);
}
template <typename Visitor> template <typename Visitor>
cgal_bgl_named_params<Visitor, boost::graph_visitor_t> cgal_bgl_named_params<Visitor, boost::graph_visitor_t>
visitor(const Visitor& p) visitor(const Visitor& p)

View File

@ -44,7 +44,6 @@ enum vertex_external_index_t { vertex_external_index } ;
/// A property tag which refers to the property /// A property tag which refers to the property
/// of a halfedge of being a border halfedge. /// of a halfedge of being a border halfedge.
enum halfedge_is_border_t { halfedge_is_border };
enum edge_external_index_t { edge_external_index } ; enum edge_external_index_t { edge_external_index } ;
/// A property tag which identifies the *index* property of /// A property tag which identifies the *index* property of
@ -100,8 +99,6 @@ using boost::halfedge_index_t;
using boost::halfedge_index; using boost::halfedge_index;
using boost::halfedge_external_index_t; using boost::halfedge_external_index_t;
using boost::halfedge_external_index; using boost::halfedge_external_index;
using boost::halfedge_is_border_t;
using boost::halfedge_is_border;
using boost::edge_external_index_t; using boost::edge_external_index_t;
using boost::edge_external_index; using boost::edge_external_index;
using boost::face_index_t; using boost::face_index_t;

View File

@ -51,36 +51,6 @@ public:
private: private:
const OpenMesh::PolyMesh_ArrayKernelT<K>& sm_; const OpenMesh::PolyMesh_ArrayKernelT<K>& sm_;
}; };
template<typename K, typename Key>
class OM_is_border_pmap
{
public:
typedef boost::read_write_property_map_tag category;
typedef bool value_type;
typedef bool reference;
typedef Key key_type;
OM_is_border_pmap(const OpenMesh::PolyMesh_ArrayKernelT<K>& sm)
: sm_(sm)
{}
friend reference get(OM_is_border_pmap pm, key_type k)
{
return pm.sm_.is_boundary(k);
}
friend void put(OM_is_border_pmap pm, key_type k , bool b)
{
if(b){
const_cast<OpenMesh::PolyMesh_ArrayKernelT<K>& >(pm.sm_).set_face_handle(k, typename OpenMesh::PolyMesh_ArrayKernelT<K>::FaceHandle());
}
}
private:
const OpenMesh::PolyMesh_ArrayKernelT<K>& sm_;
};
template <typename K, typename VEF> template <typename K, typename VEF>
class OM_index_pmap : public boost::put_get_helper<std::size_t, OM_index_pmap<K,VEF> > class OM_index_pmap : public boost::put_get_helper<std::size_t, OM_index_pmap<K,VEF> >
@ -224,31 +194,6 @@ struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, boost::vertex_point_t >
typedef type const_type; typedef type const_type;
}; };
//
// vertex_is_border
//
template<typename K>
struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, CGAL::vertex_is_border_t >
{
typedef CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>
type;
typedef type const_type;
};
//
// halfedge_is_border
//
template<typename K>
struct property_map<OpenMesh::PolyMesh_ArrayKernelT<K>, CGAL::halfedge_is_border_t >
{
typedef CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>
type;
typedef type const_type;
};
} // namespace boost } // namespace boost
namespace boost { namespace boost {
@ -306,21 +251,6 @@ get(boost::vertex_point_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g)
return CGAL::OM_point_pmap<K,P>(g); return CGAL::OM_point_pmap<K,P>(g);
} }
template<typename K>
CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>
get(boost::vertex_is_border_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g)
{
return CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::vertex_descriptor>(g);
}
template<typename K>
CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>
get(boost::halfedge_is_border_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g)
{
return CGAL::OM_is_border_pmap<K, typename boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >::halfedge_descriptor>(g);
}
// get for intrinsic properties // get for intrinsic properties
#define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE) \ #define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE) \
template<typename K> \ template<typename K> \
@ -336,7 +266,6 @@ get(boost::halfedge_is_border_t, const OpenMesh::PolyMesh_ArrayKernelT<K>& g)
// CGAL_OM_INTRINSIC_PROPERTY(std::size_t, boost::halfedge_index_t, face_descriptor) // CGAL_OM_INTRINSIC_PROPERTY(std::size_t, boost::halfedge_index_t, face_descriptor)
CGAL_OM_INTRINSIC_PROPERTY(typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3, boost::vertex_point_t, vertex_descriptor) CGAL_OM_INTRINSIC_PROPERTY(typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3, boost::vertex_point_t, vertex_descriptor)
CGAL_OM_INTRINSIC_PROPERTY(bool, boost::vertex_is_border_t, vertex_descriptor) CGAL_OM_INTRINSIC_PROPERTY(bool, boost::vertex_is_border_t, vertex_descriptor)
CGAL_OM_INTRINSIC_PROPERTY(bool, boost::halfedge_is_border_t, halfedge_descriptor)
#undef CGAL_OM_INTRINSIC_PROPERTY #undef CGAL_OM_INTRINSIC_PROPERTY

View File

@ -63,7 +63,6 @@ void concept_check_polyhedron() {
boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, face_descriptor, CGAL::face_index_t> >(); boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, face_descriptor, CGAL::face_index_t> >();
boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, halfedge_descriptor, CGAL::halfedge_index_t> >(); boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, halfedge_descriptor, CGAL::halfedge_index_t> >();
// boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, vertex_descriptor, CGAL::vertex_is_border_t> >(); // boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, vertex_descriptor, CGAL::vertex_is_border_t> >();
boost::function_requires< boost::concepts::ReadablePropertyGraph<Sm, halfedge_descriptor, CGAL::halfedge_is_border_t> >();
// null // null
boost::graph_traits<Sm>::null_vertex(); boost::graph_traits<Sm>::null_vertex();
boost::graph_traits<Sm>::null_face(); boost::graph_traits<Sm>::null_face();

View File

@ -51,8 +51,6 @@ void concept_check_polyhedron() {
boost::function_requires< boost::concepts::PropertyGraph< boost::function_requires< boost::concepts::PropertyGraph<
Polyhedron, halfedge_descriptor, CGAL::halfedge_index_t> >(); Polyhedron, halfedge_descriptor, CGAL::halfedge_index_t> >();
boost::function_requires< boost::concepts::ReadablePropertyGraph<
Polyhedron, halfedge_descriptor, CGAL::halfedge_is_border_t> >();
boost::function_requires< boost::concepts::ReadablePropertyGraph< boost::function_requires< boost::concepts::ReadablePropertyGraph<
Polyhedron, edge_descriptor, boost::edge_index_t> >(); Polyhedron, edge_descriptor, boost::edge_index_t> >();
boost::function_requires< boost::concepts::ReadablePropertyGraph< boost::function_requires< boost::concepts::ReadablePropertyGraph<