mirror of https://github.com/CGAL/cgal
Deprecate Implicit_mesh_domain_3 as well
This commit is contained in:
parent
f0233cfbf7
commit
30ff350986
|
|
@ -6,7 +6,7 @@
|
|||
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Labeled_mesh_domain_3.h>
|
||||
#include <CGAL/Polyhedral_mesh_domain_3.h>
|
||||
#include <CGAL/Mesh_domain_with_polyline_features_3.h>
|
||||
#include <CGAL/make_mesh_3.h>
|
||||
|
|
@ -25,7 +25,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef K::FT FT;
|
||||
typedef K::Point_3 Point;
|
||||
typedef FT (Function)(const Point&);
|
||||
typedef CGAL::Implicit_mesh_domain_3<Function,K> Implicit_domain;
|
||||
typedef CGAL::Labeled_mesh_domain_3<K> Implicit_domain;
|
||||
|
||||
// Polyhedral Domain
|
||||
typedef CGAL::Polyhedron_3<K> Polyhedron;
|
||||
|
|
@ -214,8 +214,10 @@ int main()
|
|||
// - the first argument is the function pointer
|
||||
// - the second argument is a bounding sphere of the domain
|
||||
// (Warning: Sphere_3 constructor uses square radius !)
|
||||
Implicit_domain sphere_domain(sphere_centered_at_111,
|
||||
K::Sphere_3(K::Point_3(1, 1, 1), 2.));
|
||||
Implicit_domain sphere_domain =
|
||||
Implicit_domain::create_implicit_mesh_domain(sphere_centered_at_111,
|
||||
K::Sphere_3(K::Point_3(1, 1, 1),
|
||||
2.));
|
||||
|
||||
Domain domain(sphere_domain, polyhedron_domain);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Labeled_mesh_domain_3.h>
|
||||
#include <CGAL/make_mesh_3.h>
|
||||
#include <CGAL/perturb_mesh_3.h>
|
||||
#include <CGAL/exude_mesh_3.h>
|
||||
|
|
@ -14,7 +14,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef K::FT FT;
|
||||
typedef K::Point_3 Point;
|
||||
typedef FT (Function)(const Point&);
|
||||
typedef CGAL::Implicit_mesh_domain_3<Function,K> Mesh_domain;
|
||||
typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;
|
||||
|
||||
// Triangulation
|
||||
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
|
||||
|
|
@ -41,7 +41,9 @@ using namespace CGAL::parameters;
|
|||
int main()
|
||||
{
|
||||
// Domain (Warning: Sphere_3 constructor uses square radius !)
|
||||
Mesh_domain domain(ellipsoid_function, K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
Mesh_domain domain =
|
||||
Mesh_domain::create_implicit_mesh_domain(ellipsoid_function,
|
||||
K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
|
||||
// Criteria
|
||||
Facet_criteria facet_criteria(30, 0.08, 0.025); // angle, size, approximation
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Labeled_mesh_domain_3.h>
|
||||
#include <CGAL/make_mesh_3.h>
|
||||
|
||||
// Domain
|
||||
|
|
@ -12,7 +12,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef K::FT FT;
|
||||
typedef K::Point_3 Point;
|
||||
typedef FT (Function)(const Point&);
|
||||
typedef CGAL::Implicit_mesh_domain_3<Function,K> Mesh_domain;
|
||||
typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;
|
||||
|
||||
#ifdef CGAL_CONCURRENT_MESH_3
|
||||
typedef CGAL::Parallel_tag Concurrency_tag;
|
||||
|
|
@ -38,8 +38,9 @@ FT sphere_function (const Point& p)
|
|||
int main()
|
||||
{
|
||||
// Domain (Warning: Sphere_3 constructor uses squared radius !)
|
||||
Mesh_domain domain(sphere_function,
|
||||
K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
Mesh_domain domain =
|
||||
Mesh_domain::create_implicit_mesh_domain(sphere_function,
|
||||
K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
|
||||
// Mesh criteria
|
||||
Mesh_criteria criteria(facet_angle=30, facet_size=0.1, facet_distance=0.025,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Labeled_mesh_domain_3.h>
|
||||
#include <CGAL/make_mesh_3.h>
|
||||
|
||||
// Domain
|
||||
|
|
@ -12,7 +12,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
|||
typedef K::FT FT;
|
||||
typedef K::Point_3 Point;
|
||||
typedef FT (Function)(const Point&);
|
||||
typedef CGAL::Implicit_mesh_domain_3<Function,K> Mesh_domain;
|
||||
typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;
|
||||
|
||||
#ifdef CGAL_CONCURRENT_MESH_3
|
||||
typedef CGAL::Parallel_tag Concurrency_tag;
|
||||
|
|
@ -52,8 +52,9 @@ FT sphere_function (const Point& p)
|
|||
int main()
|
||||
{
|
||||
// Domain (Warning: Sphere_3 constructor uses squared radius !)
|
||||
Mesh_domain domain(sphere_function,
|
||||
K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
Mesh_domain domain =
|
||||
Mesh_domain::create_implicit_mesh_domain(sphere_function,
|
||||
K::Sphere_3(CGAL::ORIGIN, 2.));
|
||||
|
||||
// Mesh criteria
|
||||
Spherical_sizing_field size;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Labeled_mesh_domain_3.h>
|
||||
#include <CGAL/Mesh_domain_with_polyline_features_3.h>
|
||||
#include <CGAL/make_mesh_3.h>
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ typedef K::FT FT;
|
|||
typedef K::Point_3 Point;
|
||||
typedef FT (Function)(const Point&);
|
||||
typedef CGAL::Mesh_domain_with_polyline_features_3<
|
||||
CGAL::Implicit_mesh_domain_3<Function,K> > Mesh_domain;
|
||||
CGAL::Labeled_mesh_domain_3<K> > Mesh_domain;
|
||||
|
||||
// Polyline
|
||||
typedef std::vector<Point> Polyline_3;
|
||||
|
|
@ -60,8 +60,9 @@ FT sphere_function (const Point& p)
|
|||
int main()
|
||||
{
|
||||
// Domain (Warning: Sphere_3 constructor uses squared radius !)
|
||||
Mesh_domain domain(sphere_function,
|
||||
K::Sphere_3(Point(1, 0, 0), 6.));
|
||||
Mesh_domain domain =
|
||||
Mesh_domain::create_implicit_mesh_domain(sphere_function,
|
||||
K::Sphere_3(Point(1, 0, 0), 6.));
|
||||
|
||||
// Mesh criteria
|
||||
Mesh_criteria criteria(edge_size = 0.15,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ template<class Image,
|
|||
class
|
||||
CGAL_DEPRECATED_MSG
|
||||
( "The class template `CGAL::Gray_image_mesh_domain_3` is now deprecated. "
|
||||
"Use the member function template "
|
||||
"Use the static member function template "
|
||||
"`Labeled_mesh_domain_3<K>::create_gray_image_mesh_domain` instead.")
|
||||
Gray_image_mesh_domain_3
|
||||
: public Labeled_mesh_domain_3<BGT, Subdomain_index>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ namespace CGAL {
|
|||
template<class Function,
|
||||
class BGT,
|
||||
class Wrapper = Implicit_to_labeling_function_wrapper<Function,BGT> >
|
||||
class Implicit_mesh_domain_3
|
||||
class
|
||||
CGAL_DEPRECATED_MSG
|
||||
( "The class template `CGAL::Implicit_mesh_domain_3` is now deprecated. "
|
||||
"Use the static member function template "
|
||||
"`Labeled_mesh_domain_3<K>::create_implicit_image_mesh_domain` instead.")
|
||||
Implicit_mesh_domain_3
|
||||
: public Labeled_mesh_domain_3<BGT>
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -68,10 +68,7 @@ public:
|
|||
Implicit_to_labeling_function_wrapper(const Function_& f)
|
||||
: r_f_(f) {}
|
||||
|
||||
// Default copy constructor and assignment operator are ok
|
||||
|
||||
/// Destructor
|
||||
~Implicit_to_labeling_function_wrapper() {}
|
||||
// Default copy constructor, assignment operator, and destructor are ok
|
||||
|
||||
/// Operator ()
|
||||
return_type operator()(const Point_3& p, const bool = true) const
|
||||
|
|
@ -85,7 +82,12 @@ private:
|
|||
|
||||
}; // end class Implicit_to_labeling_function_wrapper
|
||||
|
||||
|
||||
template <typename BGT, typename Function>
|
||||
Implicit_to_labeling_function_wrapper<Function, BGT>
|
||||
make_implicit_to_labeling_function_wrapper(const Function& f)
|
||||
{
|
||||
return Implicit_to_labeling_function_wrapper<Function, BGT>(f);
|
||||
}
|
||||
|
||||
/**
|
||||
* \deprecated
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ template<class Image,
|
|||
class
|
||||
CGAL_DEPRECATED_MSG
|
||||
( "The class template `CGAL::Labeled_image_mesh_domain_3` is now deprecated. "
|
||||
"Use the member function template "
|
||||
"Use the static member function template "
|
||||
"`Labeled_mesh_domain_3<K>::create_labeled_image_mesh_domain` instead.")
|
||||
Labeled_image_mesh_domain_3
|
||||
: public Labeled_mesh_domain_3<BGT, Subdomain_index>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@
|
|||
#include <CGAL/Image_3.h>
|
||||
#include <CGAL/Mesh_3/Image_to_labeled_function_wrapper.h>
|
||||
|
||||
// support for implicit functions
|
||||
#include <CGAL/Implicit_to_labeling_function_wrapper.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -447,6 +450,35 @@ public:
|
|||
p::construct_surface_patch_index =
|
||||
create_construct_surface_patch_index(construct_surface_patch_index_));
|
||||
}
|
||||
BOOST_PARAMETER_MEMBER_FUNCTION(
|
||||
(Labeled_mesh_domain_3),
|
||||
static create_implicit_mesh_domain,
|
||||
parameters::tag,
|
||||
(required
|
||||
(function_, *)
|
||||
(bounding_object_,*)
|
||||
)
|
||||
(optional
|
||||
(relative_error_bound_, (const FT&),
|
||||
FT(1e-3))
|
||||
(p_rng_, (CGAL::Random*), (CGAL::Random*)(0))
|
||||
(null_subdomain_index_,*,Null_functor())
|
||||
(construct_surface_patch_index_, *,
|
||||
Null_functor())
|
||||
)
|
||||
)
|
||||
{
|
||||
namespace p = CGAL::parameters;
|
||||
return Labeled_mesh_domain_3
|
||||
(make_implicit_to_labeling_function_wrapper<BGT>(function_),
|
||||
bounding_object_,
|
||||
p::relative_error_bound = relative_error_bound_,
|
||||
p::p_rng = p_rng_,
|
||||
p::null_subdomain_index =
|
||||
create_null_subdomain_index(null_subdomain_index_),
|
||||
p::construct_surface_patch_index =
|
||||
create_construct_surface_patch_index(construct_surface_patch_index_));
|
||||
}
|
||||
/// @}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue