mirror of https://github.com/CGAL/cgal
use Default for vertex point property map
This commit is contained in:
parent
67414ef0c8
commit
1cc4f732f6
|
|
@ -38,8 +38,9 @@ namespace CGAL {
|
||||||
* \cgalModels `AABBPrimitiveWithSharedData`
|
* \cgalModels `AABBPrimitiveWithSharedData`
|
||||||
*
|
*
|
||||||
*\tparam FaceGraph is a model of the face graph concept.
|
*\tparam FaceGraph is a model of the face graph concept.
|
||||||
*\tparam VertexPointPMap is a property map with `boost::graph_traits<HalfedgeGraph>::%vertex_descriptor`
|
*\tparam VertexPointPMap is a property map with `boost::graph_traits<FaceGraph>::%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.
|
||||||
|
* The default is `typename boost::property_map< FaceGraph,vertex_point_t>::%type`.
|
||||||
*\tparam OneFaceGraphPerTree is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
*\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
|
* 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
|
* 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<HalfedgeGraph,OneHalfedgeGraphPerTree,CacheDatum>`
|
*\sa `AABB_halfedge_graph_segment_primitive<HalfedgeGraph,OneHalfedgeGraphPerTree,CacheDatum>`
|
||||||
*/
|
*/
|
||||||
template < class FaceGraph,
|
template < class FaceGraph,
|
||||||
class VertexPointPMap = typename boost::property_map< FaceGraph, vertex_point_t>::type,
|
class VertexPointPMap = Default,
|
||||||
class OneFaceGraphPerTree = Tag_true,
|
class OneFaceGraphPerTree = Tag_true,
|
||||||
class CacheDatum=Tag_false >
|
class CacheDatum=Tag_false >
|
||||||
class AABB_face_graph_triangle_primitive
|
class AABB_face_graph_triangle_primitive
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
: public AABB_primitive<typename boost::graph_traits<FaceGraph>::face_descriptor,
|
: public AABB_primitive<typename boost::graph_traits<FaceGraph>::face_descriptor,
|
||||||
Triangle_from_face_descriptor_property_map<FaceGraph, VertexPointPMap>,
|
Triangle_from_face_descriptor_property_map<
|
||||||
One_point_from_face_descriptor_property_map<FaceGraph, VertexPointPMap>,
|
FaceGraph,
|
||||||
|
typename Default::Get<VertexPointPMap,
|
||||||
|
typename boost::property_map< FaceGraph,
|
||||||
|
vertex_point_t>::type >::type>,
|
||||||
|
One_point_from_face_descriptor_property_map<
|
||||||
|
FaceGraph,
|
||||||
|
typename Default::Get<VertexPointPMap,
|
||||||
|
typename boost::property_map< FaceGraph,
|
||||||
|
vertex_point_t>::type >::type>,
|
||||||
OneFaceGraphPerTree,
|
OneFaceGraphPerTree,
|
||||||
CacheDatum >
|
CacheDatum >
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
typedef typename Default::Get<VertexPointPMap, typename boost::property_map< FaceGraph, vertex_point_t>::type >::type VertexPointPMap_;
|
||||||
|
|
||||||
typedef typename boost::graph_traits<FaceGraph>::face_descriptor Id_;
|
typedef typename boost::graph_traits<FaceGraph>::face_descriptor Id_;
|
||||||
typedef Triangle_from_face_descriptor_property_map<FaceGraph,VertexPointPMap> Triangle_property_map;
|
typedef Triangle_from_face_descriptor_property_map<FaceGraph,VertexPointPMap_> Triangle_property_map;
|
||||||
typedef One_point_from_face_descriptor_property_map<FaceGraph,VertexPointPMap> Point_property_map;
|
typedef One_point_from_face_descriptor_property_map<FaceGraph,VertexPointPMap_> Point_property_map;
|
||||||
|
|
||||||
typedef AABB_primitive< Id_,
|
typedef AABB_primitive< Id_,
|
||||||
Triangle_property_map,
|
Triangle_property_map,
|
||||||
|
|
@ -110,7 +121,7 @@ public:
|
||||||
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
||||||
*/
|
*/
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
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),
|
: Base( Id_(*it),
|
||||||
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
||||||
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
||||||
|
|
@ -121,7 +132,7 @@ public:
|
||||||
If `VertexPointPMap` is the default of the class, an additional constructor
|
If `VertexPointPMap` is the default of the class, an additional constructor
|
||||||
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
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),
|
: Base( Id_(id),
|
||||||
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
||||||
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
||||||
|
|
@ -154,7 +165,7 @@ public:
|
||||||
|
|
||||||
static
|
static
|
||||||
typename Cstr_shared_data::Shared_data
|
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<FaceGraph&>(graph), vpm);
|
return Cstr_shared_data::construct_shared_data(const_cast<FaceGraph&>(graph), vpm);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@
|
||||||
#include <boost/type_traits/is_convertible.hpp>
|
#include <boost/type_traits/is_convertible.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
|
|
||||||
|
#include <CGAL/Default.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -47,8 +49,9 @@ namespace CGAL {
|
||||||
* and `AABBPrimitiveWithSharedData` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_true`.
|
* and `AABBPrimitiveWithSharedData` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_true`.
|
||||||
*
|
*
|
||||||
* \tparam HalfedgeGraph is a model of the halfedge graph concept.
|
* \tparam HalfedgeGraph is a model of the halfedge graph concept.
|
||||||
* \tparam VertexPointPMap is a property map with `boost::graph_traits<HalfedgeGraph>::%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<HalfedgeGraph>::%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`.
|
* \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
|
* 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
|
* 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<Polyhedron>` \endlink
|
* \sa \link BGLPolyGT `boost::graph_traits<Polyhedron>` \endlink
|
||||||
*/
|
*/
|
||||||
template < class HalfedgeGraph,
|
template < class HalfedgeGraph,
|
||||||
class VertexPointPMap = typename boost::property_map< HalfedgeGraph, vertex_point_t>::type,
|
class VertexPointPMap = Default,
|
||||||
class OneHalfedgeGraphPerTree = Tag_true,
|
class OneHalfedgeGraphPerTree = Tag_true,
|
||||||
class CacheDatum = Tag_false >
|
class CacheDatum = Tag_false >
|
||||||
class AABB_halfedge_graph_segment_primitive
|
class AABB_halfedge_graph_segment_primitive
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
: public AABB_primitive< typename boost::graph_traits<HalfedgeGraph>::edge_descriptor,
|
: public AABB_primitive< typename boost::graph_traits<HalfedgeGraph>::edge_descriptor,
|
||||||
Segment_from_edge_descriptor_property_map<HalfedgeGraph,VertexPointPMap>,
|
Segment_from_edge_descriptor_property_map<
|
||||||
Source_point_from_edge_descriptor<HalfedgeGraph,VertexPointPMap>,
|
HalfedgeGraph,
|
||||||
|
typename Default::Get<VertexPointPMap,
|
||||||
|
typename boost::property_map< HalfedgeGraph,
|
||||||
|
vertex_point_t>::type >::type >,
|
||||||
|
Source_point_from_edge_descriptor<
|
||||||
|
HalfedgeGraph,
|
||||||
|
typename Default::Get<VertexPointPMap,
|
||||||
|
typename boost::property_map< HalfedgeGraph,
|
||||||
|
vertex_point_t>::type >::type >,
|
||||||
OneHalfedgeGraphPerTree,
|
OneHalfedgeGraphPerTree,
|
||||||
CacheDatum >
|
CacheDatum >
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
typedef typename Default::Get<VertexPointPMap,typename boost::property_map< HalfedgeGraph,vertex_point_t>::type >::type VertexPointPMap_;
|
||||||
|
|
||||||
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor Id_;
|
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor Id_;
|
||||||
typedef Segment_from_edge_descriptor_property_map<HalfedgeGraph,VertexPointPMap> Segment_property_map;
|
typedef Segment_from_edge_descriptor_property_map<HalfedgeGraph,VertexPointPMap_> Segment_property_map;
|
||||||
typedef Source_point_from_edge_descriptor<HalfedgeGraph,VertexPointPMap> Point_property_map;
|
typedef Source_point_from_edge_descriptor<HalfedgeGraph,VertexPointPMap_> Point_property_map;
|
||||||
|
|
||||||
typedef AABB_primitive< Id_,
|
typedef AABB_primitive< Id_,
|
||||||
Segment_property_map,
|
Segment_property_map,
|
||||||
|
|
@ -122,7 +135,7 @@ public:
|
||||||
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
||||||
*/
|
*/
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
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),
|
: Base( Id_(*it),
|
||||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
||||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
||||||
|
|
@ -133,7 +146,7 @@ public:
|
||||||
If `VertexPointPMap` is the default of the class, an additional constructor
|
If `VertexPointPMap` is the default of the class, an additional constructor
|
||||||
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
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),
|
: Base( Id_(id),
|
||||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
||||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
||||||
|
|
@ -164,7 +177,7 @@ public:
|
||||||
|
|
||||||
static
|
static
|
||||||
typename Cstr_shared_data::Shared_data
|
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<HalfedgeGraph&>(graph), vpm);
|
return Cstr_shared_data::construct_shared_data(const_cast<HalfedgeGraph&>(graph), vpm);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue