diff --git a/Polyhedron/include/CGAL/Polyhedron_3_property_map.h b/Polyhedron/include/CGAL/Polyhedron_3_property_map.h index c109109f355..62464d8c937 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3_property_map.h +++ b/Polyhedron/include/CGAL/Polyhedron_3_property_map.h @@ -30,8 +30,7 @@ namespace CGAL{ //property map template struct Triangle_from_facet_property_map{ - Triangle_from_facet_property_map(){} - Triangle_from_facet_property_map(Polyhedron&){} + Triangle_from_facet_property_map(Polyhedron* = NULL){} //classical typedefs typedef typename boost::mpl::if_< typename boost::is_const::type, @@ -59,6 +58,7 @@ get(const Triangle_from_facet_property_map&, template struct Segment_from_halfedge_property_map{ + Segment_from_halfedge_property_map(Polyhedron* = NULL){} //classical typedefs typedef typename boost::mpl::if_< typename boost::is_const::type, @@ -85,8 +85,7 @@ get(const Segment_from_halfedge_property_map&, //property map to access a point from a Facet template struct One_point_from_facet_property_map{ - One_point_from_facet_property_map(){} - One_point_from_facet_property_map(Polyhedron&){} + One_point_from_facet_property_map(Polyhedron* = NULL){} //classical typedefs typedef typename boost::mpl::if_< typename boost::is_const::type, @@ -106,6 +105,29 @@ get(const One_point_from_facet_property_map&, return f.halfedge()->vertex()->point(); } +//property map to access a point from a Halfedge +template +struct One_point_from_halfedge_property_map{ + One_point_from_halfedge_property_map(Polyhedron* = NULL){} + //classical typedefs + typedef typename boost::mpl::if_< + typename boost::is_const::type, + const typename Polyhedron::Halfedge, + typename Polyhedron::Halfedge >::type key_type; + typedef typename Polyhedron::Traits::Kernel::Point_3 value_type; + typedef const value_type& reference; + typedef boost::lvalue_property_map_tag category; +}; +//get function for property map +template +inline +typename One_point_from_halfedge_property_map::reference +get(const One_point_from_halfedge_property_map&, + typename One_point_from_halfedge_property_map::key_type& h) +{ + return h.vertex()->point(); +} + } //namespace CGAL #endif //CGAL_POLYHEDRON_SIMPLEX_PROPERTY_MAP_H