mirror of https://github.com/CGAL/cgal
Fix compilation errors (in the Polyhedron Demo)
This commit is contained in:
parent
f63605355a
commit
62d1cfecbe
|
|
@ -453,12 +453,15 @@ Mesh_3/examples/Mesh_3/test_off
|
|||
/Mesh_3/test/Mesh_3/test_mesh_3_implicit_vector_to_labeled_function_wrapper
|
||||
/Mesh_3/test/Mesh_3/test_mesh_3_labeled_mesh_domain_3
|
||||
/Mesh_3/test/Mesh_3/test_mesh_criteria_creation
|
||||
/Mesh_3/test/Mesh_3/test_mesh_implicit_domains
|
||||
/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image
|
||||
/Mesh_3/test/Mesh_3/test_meshing_3D_image
|
||||
/Mesh_3/test/Mesh_3/test_meshing_determinism
|
||||
/Mesh_3/test/Mesh_3/test_meshing_implicit_function
|
||||
/Mesh_3/test/Mesh_3/test_meshing_polyhedron
|
||||
/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features
|
||||
/Mesh_3/test/Mesh_3/test_meshing_polylines_only
|
||||
/Mesh_3/test/Mesh_3/test_meshing_unit_tetrahedron
|
||||
/Mesh_3/test/Mesh_3/test_off
|
||||
/Mesh_3/test/Mesh_3/test_robust_weighted_circumcenter
|
||||
/Mesh_3/test/Mesh_3/test-tetgen.elem
|
||||
|
|
|
|||
|
|
@ -74,13 +74,15 @@ public:
|
|||
typedef typename Base::FT FT;
|
||||
typedef BGT Geom_traits;
|
||||
typedef CGAL::Bbox_3 Bbox_3;
|
||||
typedef CGAL::Identity<Subdomain_index> Identity;
|
||||
|
||||
/// Constructor
|
||||
Labeled_image_mesh_domain_3(const Image& image,
|
||||
const FT& error_bound = FT(1e-3),
|
||||
Subdomain_index value_outside = 0,
|
||||
Null null = Null(),
|
||||
CGAL::Random* p_rng = NULL)
|
||||
: Base(Wrapper(image),
|
||||
: Base(Wrapper(image, Identity(), value_outside),
|
||||
compute_bounding_box(image),
|
||||
error_bound,
|
||||
null,
|
||||
|
|
@ -90,9 +92,10 @@ public:
|
|||
Labeled_image_mesh_domain_3(const Image& image,
|
||||
const CGAL::Bbox_3& bbox,
|
||||
const FT& error_bound = FT(1e-3),
|
||||
Subdomain_index value_outside = 0,
|
||||
Null null = Null(),
|
||||
CGAL::Random* p_rng = NULL)
|
||||
: Base(Wrapper(image),
|
||||
: Base(Wrapper(image, Identity(), value_outside),
|
||||
bbox,
|
||||
error_bound,
|
||||
null,
|
||||
|
|
|
|||
|
|
@ -122,6 +122,20 @@ public:
|
|||
Null null = Null(),
|
||||
CGAL::Random* p_rng = NULL);
|
||||
|
||||
Labeled_mesh_domain_3(const Function& f,
|
||||
const Sphere_3& bounding_sphere,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng);
|
||||
|
||||
Labeled_mesh_domain_3(const Function& f,
|
||||
const Bbox_3& bbox,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng);
|
||||
|
||||
Labeled_mesh_domain_3(const Function& f,
|
||||
const Iso_cuboid_3& bbox,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng);
|
||||
/// Destructor
|
||||
virtual ~Labeled_mesh_domain_3()
|
||||
{
|
||||
|
|
@ -528,16 +542,10 @@ Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
|||
: function_(f)
|
||||
, bbox_(iso_cuboid(bounding_sphere.bbox()))
|
||||
, null(null)
|
||||
, p_rng_(p_rng)
|
||||
, delete_rng_(false)
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
|
||||
{
|
||||
// TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
|
||||
if(!p_rng_)
|
||||
{
|
||||
p_rng_ = new CGAL::Random(0);
|
||||
delete_rng_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
|
|
@ -550,16 +558,10 @@ Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
|||
: function_(f)
|
||||
, bbox_(iso_cuboid(bbox))
|
||||
, null(null)
|
||||
, p_rng_(p_rng)
|
||||
, delete_rng_(false)
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bbox_,error_bound))
|
||||
{
|
||||
// TODO : CGAL_ASSERT(0 < f(bounding_sphere.get_center()) ) ?
|
||||
if(!p_rng_)
|
||||
{
|
||||
p_rng_ = new CGAL::Random(0);
|
||||
delete_rng_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
|
|
@ -572,20 +574,61 @@ Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
|||
: function_(f)
|
||||
, bbox_(bbox)
|
||||
, null(null)
|
||||
, p_rng_(p_rng)
|
||||
, delete_rng_(false)
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bbox_,error_bound))
|
||||
{
|
||||
// TODO : CGAL_ASSERT(0 < f( bbox.get_center()) ) ?
|
||||
if(!p_rng_)
|
||||
{
|
||||
p_rng_ = new CGAL::Random(0);
|
||||
delete_rng_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
||||
const F& f,
|
||||
const Sphere_3& bounding_sphere,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng)
|
||||
: function_(f)
|
||||
, bbox_(iso_cuboid(bounding_sphere.bbox()))
|
||||
, null(Null())
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bounding_sphere,error_bound))
|
||||
{
|
||||
}
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
||||
const F& f,
|
||||
const Bbox_3& bbox,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng)
|
||||
: function_(f)
|
||||
, bbox_(iso_cuboid(bbox))
|
||||
, null(Null())
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bbox_,error_bound))
|
||||
{
|
||||
}
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
Labeled_mesh_domain_3<F,BGT,Null>::Labeled_mesh_domain_3(
|
||||
const F& f,
|
||||
const Iso_cuboid_3& bbox,
|
||||
const FT& error_bound,
|
||||
CGAL::Random* p_rng)
|
||||
: function_(f)
|
||||
, bbox_(bbox)
|
||||
, null(Null())
|
||||
, p_rng_(p_rng == 0 ? new CGAL::Random(0) : p_rng)
|
||||
, delete_rng_(p_rng == 0)
|
||||
, squared_error_bound_(squared_error_bound(bbox_,error_bound))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
template<class F, class BGT, class Null>
|
||||
template<class OutputIterator>
|
||||
OutputIterator
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ template<class Image_,
|
|||
class BGT,
|
||||
typename Image_word_type = unsigned char,
|
||||
typename Return_type = int,
|
||||
typename Transform = Identity<Image_word_type>,
|
||||
typename Transform = Identity<Return_type>,
|
||||
bool labeled_image = true,
|
||||
bool use_trilinear_interpolation=true>
|
||||
class Image_to_labeled_function_wrapper
|
||||
|
|
@ -65,7 +65,6 @@ public:
|
|||
, transform(transform)
|
||||
, value_outside(value_outside)
|
||||
{
|
||||
CGAL_assertion(transform(value_outside) == return_type());
|
||||
}
|
||||
|
||||
// Default copy constructor and assignment operator are ok
|
||||
|
|
@ -92,12 +91,11 @@ public:
|
|||
value_outside)));
|
||||
} else {
|
||||
return static_cast<return_type>(transform(
|
||||
static_cast<typename Transform::argument_type>(
|
||||
r_im_.template trilinear_interpolation<Image_word_type, double>(
|
||||
CGAL::to_double(p.x()),
|
||||
CGAL::to_double(p.y()),
|
||||
CGAL::to_double(p.z()),
|
||||
value_outside))));
|
||||
value_outside)));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -71,14 +71,18 @@ public:
|
|||
const typename Base::Bbox_3& bbox,
|
||||
const typename Base::FT& error_bound = Base::FT(1e-3),
|
||||
CGAL::Random* p_rng = NULL)
|
||||
: Base(f, bbox, error_bound, Null_subdomain_index(), p_rng)
|
||||
: Base(f, bbox, error_bound,
|
||||
// Subdomain_index(), Null_subdomain_index(),
|
||||
p_rng)
|
||||
{}
|
||||
|
||||
Polyhedron_demo_labeled_mesh_domain_3(
|
||||
const Image& img,
|
||||
const typename Base::FT& error_bound = Base::FT(1e-3),
|
||||
CGAL::Random* p_rng = NULL)
|
||||
: Base(img, error_bound, Null_subdomain_index(), p_rng)
|
||||
: Base(img, error_bound,
|
||||
// Subdomain_index(), Null_subdomain_index(),
|
||||
p_rng)
|
||||
{}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue