diff --git a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h index 4cad3af9429..4ffe06cd66c 100644 --- a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h @@ -38,8 +38,9 @@ namespace CGAL { * \cgalModels `AABBPrimitiveWithSharedData` * *\tparam FaceGraph is a model of the face graph concept. - *\tparam VertexPointPMap is a property map with `boost::graph_traits::%vertex_descriptor` + *\tparam VertexPointPMap is a property map with `boost::graph_traits::%vertex_descriptor` * as key type and a \cgal Kernel `Point_3` as value type. + * The default is `typename boost::property_map< FaceGraph,vertex_point_t>::%type`. *\tparam OneFaceGraphPerTree is either `CGAL::Tag_true` or `CGAL::Tag_false`. * In the former case, we guarantee that all the primitives will be from a * common polyhedron and some data will be factorized so that the size of @@ -54,21 +55,31 @@ namespace CGAL { *\sa `AABB_halfedge_graph_segment_primitive` */ template < class FaceGraph, - class VertexPointPMap = typename boost::property_map< FaceGraph, vertex_point_t>::type, + class VertexPointPMap = Default, class OneFaceGraphPerTree = Tag_true, class CacheDatum=Tag_false > class AABB_face_graph_triangle_primitive #ifndef DOXYGEN_RUNNING : public AABB_primitive::face_descriptor, - Triangle_from_face_descriptor_property_map, - One_point_from_face_descriptor_property_map, + Triangle_from_face_descriptor_property_map< + FaceGraph, + typename Default::Get::type >::type>, + One_point_from_face_descriptor_property_map< + FaceGraph, + typename Default::Get::type >::type>, OneFaceGraphPerTree, CacheDatum > #endif { + typedef typename Default::Get::type >::type VertexPointPMap_; + typedef typename boost::graph_traits::face_descriptor Id_; - typedef Triangle_from_face_descriptor_property_map Triangle_property_map; - typedef One_point_from_face_descriptor_property_map Point_property_map; + typedef Triangle_from_face_descriptor_property_map Triangle_property_map; + typedef One_point_from_face_descriptor_property_map Point_property_map; typedef AABB_primitive< Id_, Triangle_property_map, @@ -110,7 +121,7 @@ public: is available with `vppm` set to `boost::get(vertex_point, graph)`. */ template - AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap vppm) + AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap_ vppm) : Base( Id_(*it), Triangle_property_map(const_cast(&graph),vppm), Point_property_map(const_cast(&graph),vppm) ) @@ -121,7 +132,7 @@ public: If `VertexPointPMap` is the default of the class, an additional constructor is available with `vppm` set to `boost::get(vertex_point, graph)`. */ - AABB_face_graph_triangle_primitive(Id id, const FaceGraph& graph, VertexPointPMap vppm) + AABB_face_graph_triangle_primitive(Id id, const FaceGraph& graph, VertexPointPMap_ vppm) : Base( Id_(id), Triangle_property_map(const_cast(&graph),vppm), Point_property_map(const_cast(&graph),vppm) ) @@ -154,7 +165,7 @@ public: static typename Cstr_shared_data::Shared_data - construct_shared_data(const FaceGraph& graph, const VertexPointPMap& vpm) + construct_shared_data(const FaceGraph& graph, const VertexPointPMap_& vpm) { return Cstr_shared_data::construct_shared_data(const_cast(graph), vpm); } diff --git a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 6df105f1b8a..5e234c76985 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -31,6 +31,8 @@ #include #include +#include + namespace CGAL { @@ -47,8 +49,9 @@ namespace CGAL { * and `AABBPrimitiveWithSharedData` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_true`. * * \tparam HalfedgeGraph is a model of the halfedge graph concept. - * \tparam VertexPointPMap is a property map with `boost::graph_traits::%vertex_descriptor` - * as key type and a \cgal Kernel `Point_3` as value type. + * as key type and a \cgal Kernel `Point_3` as value type. + * \tparam VertexPointPMap is a property map with `boost::graph_traits::%vertex_descriptor`. + * The default is `typename boost::property_map< HalfedgeGraph,vertex_point_t>::%type`. * \tparam OneHalfedgeGraphPerTree is either `CGAL::Tag_true` or `CGAL::Tag_false`. * In the former case, we guarantee that all the primitives will be from a * common `HalfedgeGraph` and some data will be factorized so that the size of @@ -64,21 +67,31 @@ namespace CGAL { * \sa \link BGLPolyGT `boost::graph_traits` \endlink */ template < class HalfedgeGraph, - class VertexPointPMap = typename boost::property_map< HalfedgeGraph, vertex_point_t>::type, + class VertexPointPMap = Default, class OneHalfedgeGraphPerTree = Tag_true, class CacheDatum = Tag_false > class AABB_halfedge_graph_segment_primitive #ifndef DOXYGEN_RUNNING : public AABB_primitive< typename boost::graph_traits::edge_descriptor, - Segment_from_edge_descriptor_property_map, - Source_point_from_edge_descriptor, + Segment_from_edge_descriptor_property_map< + HalfedgeGraph, + typename Default::Get::type >::type >, + Source_point_from_edge_descriptor< + HalfedgeGraph, + typename Default::Get::type >::type >, OneHalfedgeGraphPerTree, CacheDatum > #endif { + typedef typename Default::Get::type >::type VertexPointPMap_; + typedef typename boost::graph_traits::edge_descriptor Id_; - typedef Segment_from_edge_descriptor_property_map Segment_property_map; - typedef Source_point_from_edge_descriptor Point_property_map; + typedef Segment_from_edge_descriptor_property_map Segment_property_map; + typedef Source_point_from_edge_descriptor Point_property_map; typedef AABB_primitive< Id_, Segment_property_map, @@ -122,7 +135,7 @@ public: is available with `vppm` set to `boost::get(vertex_point, graph)`. */ template - AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph, VertexPointPMap vppm) + AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph, VertexPointPMap_ vppm) : Base( Id_(*it), Segment_property_map(const_cast(&graph), vppm), Point_property_map(const_cast(&graph), vppm) ) @@ -133,7 +146,7 @@ public: If `VertexPointPMap` is the default of the class, an additional constructor is available with `vppm` set to `boost::get(vertex_point, graph)`. */ - AABB_halfedge_graph_segment_primitive(Id id, const HalfedgeGraph& graph, VertexPointPMap vppm) + AABB_halfedge_graph_segment_primitive(Id id, const HalfedgeGraph& graph, VertexPointPMap_ vppm) : Base( Id_(id), Segment_property_map(const_cast(&graph), vppm), Point_property_map(const_cast(&graph), vppm) ) @@ -164,7 +177,7 @@ public: static typename Cstr_shared_data::Shared_data - construct_shared_data(const HalfedgeGraph& graph, const VertexPointPMap& vpm) + construct_shared_data(const HalfedgeGraph& graph, const VertexPointPMap_& vpm) { return Cstr_shared_data::construct_shared_data(const_cast(graph), vpm); }