mirror of https://github.com/CGAL/cgal
generic free function for point range and triangle range
This commit is contained in:
parent
f399cfed18
commit
bd111bcb89
|
|
@ -38,9 +38,6 @@ struct Indexed_triangle_set
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename P, typename V, typename F>
|
template <typename P, typename V, typename F>
|
||||||
void add_isolated_points(const P& point, Indexed_triangle_set<V,F>& its)
|
void add_isolated_points(const P& point, Indexed_triangle_set<V,F>& its)
|
||||||
{
|
{
|
||||||
|
|
@ -95,8 +92,8 @@ void copy_face_graph(const TDS& tds, Convex_hull_3::internal::Indexed_triangle_s
|
||||||
template <typename V, typename F>
|
template <typename V, typename F>
|
||||||
void clear(Convex_hull_3::internal::Indexed_triangle_set<V,F>& its)
|
void clear(Convex_hull_3::internal::Indexed_triangle_set<V,F>& its)
|
||||||
{
|
{
|
||||||
its.vertices.clear();
|
CGAL::internal::resize(its.vertices, 0);
|
||||||
its.faces.clear();
|
CGAL::internal::resize(its.faces, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1086,30 +1086,34 @@ void convex_hull_3(const VertexListGraph& g,
|
||||||
convex_hull_3(g,pm,CGAL::parameters::all_default());
|
convex_hull_3(g,pm,CGAL::parameters::all_default());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class InputIterator, class P>
|
template <class InputIterator, class PointRange, class TriangleRange>
|
||||||
void convex_hull_3(InputIterator first, InputIterator beyond,
|
void convex_hull_3(InputIterator first, InputIterator beyond,
|
||||||
std::vector<P>& vertices,
|
PointRange& vertices,
|
||||||
std::vector<std::array<int,3> >& faces,
|
TriangleRange& faces,
|
||||||
typename std::enable_if<CGAL::is_iterator<InputIterator>::value>::type* = 0)
|
typename std::enable_if<CGAL::is_iterator<InputIterator>::value>::type* = 0,
|
||||||
|
typename std::enable_if<boost::has_range_iterator<PointRange>::value>::type* = 0,
|
||||||
|
typename std::enable_if<boost::has_range_iterator<TriangleRange>::value>::type* = 0)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
|
typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
|
||||||
typedef typename Kernel_traits<Point_3>::type Traits;
|
typedef typename Kernel_traits<Point_3>::type Traits;
|
||||||
|
|
||||||
Convex_hull_3::internal::Indexed_triangle_set< std::vector<P>, std::vector<std::array<int,3> >> its(vertices,faces);
|
Convex_hull_3::internal::Indexed_triangle_set<PointRange, TriangleRange> its(vertices,faces);
|
||||||
convex_hull_3(first, beyond, its, Traits());
|
convex_hull_3(first, beyond, its, Traits());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class InputIterator, class P, class Traits>
|
template <class InputIterator, class P, class PointRange, class TriangleRange, class Traits>
|
||||||
void convex_hull_3(InputIterator first, InputIterator beyond,
|
void convex_hull_3(InputIterator first, InputIterator beyond,
|
||||||
std::vector<P>& vertices,
|
PointRange& vertices,
|
||||||
std::vector<std::array<int,3> >& faces,
|
TriangleRange& faces,
|
||||||
const Traits& traits,
|
const Traits& traits,
|
||||||
typename std::enable_if<CGAL::is_iterator<InputIterator>::value>::type* = 0)
|
typename std::enable_if<CGAL::is_iterator<InputIterator>::value>::type* = 0,
|
||||||
|
typename std::enable_if<boost::has_range_iterator<PointRange>::value>::type* = 0,
|
||||||
|
typename std::enable_if<boost::has_range_iterator<TriangleRange>::value>::type* = 0)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
|
typedef typename std::iterator_traits<InputIterator>::value_type Point_3;
|
||||||
|
|
||||||
Convex_hull_3::internal::Indexed_triangle_set< std::vector<P>, std::vector<std::array<int,3> >> its(vertices,faces);
|
Convex_hull_3::internal::Indexed_triangle_set<PointRange, TriangleRange> its(vertices,faces);
|
||||||
convex_hull_3(first, beyond, its, traits);
|
convex_hull_3(first, beyond, its, traits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue