Merge branch '5.1.x-branch' into 5.2.x-branch

This commit is contained in:
Laurent Rineau 2020-12-15 09:07:21 +01:00
commit a0e1b15da3
5 changed files with 37 additions and 19 deletions

View File

@ -128,12 +128,26 @@ public:
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor; typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
// constructors // constructors
#ifdef DOXYGEN_RUNNING
/*! /*!
constructs a primitive.
\tparam Iterator an input iterator with `Id` as value type. \tparam Iterator an input iterator with `Id` as value type.
If `VertexPointPMap` is the default of the class, an additional constructor
is available with `vppm` set to `get(vertex_point, graph)`.
*/
template <class Iterator>
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap vppm);
/*!
constructs a primitive. constructs a primitive.
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 `get(vertex_point, graph)`. is available with `vppm` set to `get(vertex_point, graph)`.
*/ */
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap vppm);
#else
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_(make_id(*it, graph, OneFaceGraphPerTree())), : Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),
@ -141,18 +155,12 @@ public:
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) ) Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
{} {}
/*!
constructs a primitive.
If `VertexPointPMap` is the default of the class, an additional constructor
is available with `vppm` set to `get(vertex_point, graph)`.
*/
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap_ vppm) AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap_ vppm)
: Base( Id_(make_id(fd, graph, OneFaceGraphPerTree())), : Base( Id_(make_id(fd, graph, OneFaceGraphPerTree())),
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) )
{} {}
#ifndef DOXYGEN_RUNNING
template <class Iterator> template <class Iterator>
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph) AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph)
: Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())), : Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),

View File

@ -140,14 +140,27 @@ public:
#endif #endif
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor edge_descriptor; typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor edge_descriptor;
#ifdef DOXYGEN_RUNNING
/*! /*!
constructs a primitive. constructs a primitive.
\tparam Iterator is an input iterator with `Id` as value type. \tparam Iterator is an input iterator with `Id` as value type.
This \ref AABB_tree/AABB_halfedge_graph_edge_example.cpp "example" gives a way to call this constructor This \ref AABB_tree/AABB_halfedge_graph_edge_example.cpp "example" gives a way to call this constructor
using the insert-by-range method of the class `AABB_tree<Traits>`. using the insert-by-range method of the class `AABB_tree<Traits>`.
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)`.
*/ */
template <class Iterator>
AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph, VertexPointPMap vppm);
/*!
constructs a primitive.
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(edge_descriptor ed, const HalfedgeGraph& graph, VertexPointPMap vppm);
#else
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_(make_id(*it, graph, OneHalfedgeGraphPerTree())), : Base( Id_(make_id(*it, graph, OneHalfedgeGraphPerTree())),
@ -155,18 +168,12 @@ public:
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) ) Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
{} {}
/*!
constructs a primitive.
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(edge_descriptor ed, const HalfedgeGraph& graph, VertexPointPMap_ vppm) AABB_halfedge_graph_segment_primitive(edge_descriptor ed, const HalfedgeGraph& graph, VertexPointPMap_ vppm)
: Base( Id_(make_id(ed, graph, OneHalfedgeGraphPerTree())), : Base( Id_(make_id(ed, graph, OneHalfedgeGraphPerTree())),
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) )
{} {}
#ifndef DOXYGEN_RUNNING
template <class Iterator> template <class Iterator>
AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph) AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph)
: Base( Id_(make_id(*it, graph, OneHalfedgeGraphPerTree())), : Base( Id_(make_id(*it, graph, OneHalfedgeGraphPerTree())),

View File

@ -511,7 +511,7 @@ namespace CGAL {
// Minimum number of points has been set? // Minimum number of points has been set?
m_options.min_points = m_options.min_points =
(m_options.min_points >= m_num_available_points) ? (m_options.min_points == (std::numeric_limits<std::size_t>::max)()) ?
(std::size_t)((FT)0.01 * m_num_available_points) : (std::size_t)((FT)0.01 * m_num_available_points) :
m_options.min_points; m_options.min_points;
m_options.min_points = (m_options.min_points < 10) ? 10 : m_options.min_points; m_options.min_points = (m_options.min_points < 10) ? 10 : m_options.min_points;
@ -519,6 +519,9 @@ namespace CGAL {
// Initializing the shape index // Initializing the shape index
m_shape_index.assign(m_num_available_points, -1); m_shape_index.assign(m_num_available_points, -1);
if (m_options.min_points > m_num_available_points)
return true;
// List of all randomly drawn candidates // List of all randomly drawn candidates
// with the minimum number of points // with the minimum number of points
std::vector<Shape *> candidates; std::vector<Shape *> candidates;