mirror of https://github.com/CGAL/cgal
for convenience add a default to simple converter
it is useful if you want to copy the tds of a familly alpha-shape into a fixed one
This commit is contained in:
parent
0a1bb3e4cd
commit
f9e0c97aac
|
|
@ -1832,14 +1832,28 @@ copy_tds(const TDS_src& tds_src,
|
|||
//utilities for copy_tds
|
||||
namespace internal { namespace TDS_2{
|
||||
template <class Vertex_src,class Vertex_tgt>
|
||||
struct Default_vertex_converter;
|
||||
struct Default_vertex_converter
|
||||
{
|
||||
Vertex_tgt operator()(const Vertex_src& src) const {
|
||||
return Vertex_src( src.point() );
|
||||
}
|
||||
|
||||
void operator()(const Vertex_src&,Vertex_tgt&) const {}
|
||||
};
|
||||
|
||||
template <class Face_src,class Face_tgt>
|
||||
struct Default_face_converter;
|
||||
struct Default_face_converter
|
||||
{
|
||||
Face_tgt operator()(const Face_src& src) const {
|
||||
return Face_tgt();
|
||||
}
|
||||
|
||||
void operator()(const Face_src&,Face_tgt&) const {}
|
||||
};
|
||||
|
||||
template <class Vertex>
|
||||
struct Default_vertex_converter<Vertex,Vertex>
|
||||
{
|
||||
inline
|
||||
const Vertex& operator()(const Vertex& src) const {
|
||||
return src;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3435,14 +3435,28 @@ copy_tds(const TDS_src& tds,
|
|||
//utilities for copy_tds
|
||||
namespace internal { namespace TDS_3{
|
||||
template <class Vertex_src,class Vertex_tgt>
|
||||
struct Default_vertex_converter;
|
||||
struct Default_vertex_converter
|
||||
{
|
||||
Vertex_tgt operator()(const Vertex_src& src) const {
|
||||
return Vertex_tgt(src.point());
|
||||
}
|
||||
|
||||
void operator()(const Vertex_src&,Vertex_tgt&) const {}
|
||||
};
|
||||
|
||||
template <class Cell_src,class Cell_tgt>
|
||||
struct Default_cell_converter;
|
||||
struct Default_cell_converter
|
||||
{
|
||||
Cell_tgt operator()(const Cell_src&) const {
|
||||
return Cell_tgt();
|
||||
}
|
||||
|
||||
void operator()(const Cell_src&,Cell_tgt&) const {}
|
||||
};
|
||||
|
||||
template <class Vertex>
|
||||
struct Default_vertex_converter<Vertex,Vertex>
|
||||
{
|
||||
inline
|
||||
const Vertex& operator()(const Vertex& src) const {
|
||||
return src;
|
||||
}
|
||||
|
|
@ -3452,7 +3466,6 @@ namespace internal { namespace TDS_3{
|
|||
|
||||
template <class Cell>
|
||||
struct Default_cell_converter<Cell,Cell>{
|
||||
inline
|
||||
const Cell& operator()(const Cell& src) const {
|
||||
return src;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue