This commit is contained in:
ange-clement 2023-10-16 14:04:45 +02:00
parent 0d0c1f3213
commit 9fc7230e64
3 changed files with 11 additions and 8 deletions

View File

@ -41,7 +41,7 @@ namespace internal {
template < typename C3T3, typename MeshDomain, typename MeshCriteria, typename InitialPointsGenerator = Null_functor > template < typename C3T3, typename MeshDomain, typename MeshCriteria, typename InitialPointsGenerator = Null_functor >
void void
init_c3t3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria&, init_c3t3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria&,
const int nb_initial_points, InitialPointsGenerator& generator = Null_functor()) const int nb_initial_points, InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
typedef typename MeshDomain::Point_3 Point_3; typedef typename MeshDomain::Point_3 Point_3;
typedef typename MeshDomain::Index Index; typedef typename MeshDomain::Index Index;
@ -184,7 +184,7 @@ struct C3t3_initializer < C3T3, MD, MC, false, HasFeatures, InitialPointsGenerat
const MC& criteria, const MC& criteria,
bool with_features, bool with_features,
Mesh_3_options mesh_options = Mesh_3_options(), Mesh_3_options mesh_options = Mesh_3_options(),
InitialPointsGenerator& generator = Null_functor()) InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
if ( with_features ) if ( with_features )
{ {
@ -208,7 +208,7 @@ struct C3t3_initializer < C3T3, MD, MC, true, HasFeatures, InitialPointsGenerato
const MC& criteria, const MC& criteria,
bool with_features, bool with_features,
Mesh_3_options mesh_options = Mesh_3_options(), Mesh_3_options mesh_options = Mesh_3_options(),
InitialPointsGenerator& generator = Null_functor()) InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
C3t3_initializer < C3T3, MD, MC, true, typename MD::Has_features, InitialPointsGenerator >() C3t3_initializer < C3T3, MD, MC, true, typename MD::Has_features, InitialPointsGenerator >()
(c3t3,domain,criteria,with_features,mesh_options,generator); (c3t3,domain,criteria,with_features,mesh_options,generator);
@ -230,7 +230,7 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true, InitialPointsGener
const MC& criteria, const MC& criteria,
bool with_features, bool with_features,
Mesh_3_options mesh_options = Mesh_3_options(), Mesh_3_options mesh_options = Mesh_3_options(),
InitialPointsGenerator& generator = Null_functor()) InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
if ( with_features ) { if ( with_features ) {
this->initialize_features(c3t3, domain, criteria,mesh_options); this->initialize_features(c3t3, domain, criteria,mesh_options);
@ -276,7 +276,7 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false, InitialPointsGene
const MC& criteria, const MC& criteria,
bool with_features, bool with_features,
Mesh_3_options mesh_options = Mesh_3_options(), Mesh_3_options mesh_options = Mesh_3_options(),
InitialPointsGenerator& generator = Null_functor()) InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
if ( with_features ) if ( with_features )
{ {
@ -524,7 +524,7 @@ void make_mesh_3_impl(C3T3& c3t3,
mesh_options = parameters::internal::Mesh_3_options(), mesh_options = parameters::internal::Mesh_3_options(),
const parameters::internal::Manifold_options& const parameters::internal::Manifold_options&
manifold_options = parameters::internal::Manifold_options(), manifold_options = parameters::internal::Manifold_options(),
InitialPointsGenerator& generator = Null_functor()) InitialPointsGenerator& generator = Null_functor_internal::default_null_functor)
{ {
#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING #ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
CGAL::get_default_random() = CGAL::Random(0); CGAL::get_default_random() = CGAL::Random(0);

View File

@ -188,8 +188,8 @@ struct Initial_points_generator_wrapper
} }
private: private:
std::function<OutputIterator(OutputIterator,MeshDomain,C3t3)> initial_points_generator_default_; const std::function<OutputIterator(OutputIterator,MeshDomain,C3t3)> initial_points_generator_default_;
std::function<OutputIterator(OutputIterator,MeshDomain,C3t3,int)> initial_points_generator_; const std::function<OutputIterator(OutputIterator,MeshDomain,C3t3,int)> initial_points_generator_;
}; };
template <typename OutputIterator, typename MeshDomain, typename C3t3> template <typename OutputIterator, typename MeshDomain, typename C3t3>
struct Initial_points_generator_default struct Initial_points_generator_default

View File

@ -53,6 +53,9 @@ struct Null_functor {
typedef Null_tag result_type; typedef Null_tag result_type;
typedef Null_tag second_argument_type; typedef Null_tag second_argument_type;
}; };
namespace Null_functor_internal {
static Null_functor default_null_functor;
}
// For concurrency // For concurrency
struct Sequential_tag {}; struct Sequential_tag {};