mirror of https://github.com/CGAL/cgal
Use internal squared radius for backward compatibility
This commit is contained in:
parent
09bdbad8e9
commit
6ab9c45851
|
|
@ -100,13 +100,15 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Alpha_shape_mesher (bool separate_shells = false, bool force_manifold = false,
|
Alpha_shape_mesher (FT squared_radius,
|
||||||
|
bool separate_shells = false,
|
||||||
|
bool force_manifold = false,
|
||||||
FT border_angle = 45.)
|
FT border_angle = 45.)
|
||||||
: _separate_shells (separate_shells),
|
: _separate_shells (separate_shells),
|
||||||
_force_manifold (force_manifold),
|
_force_manifold (force_manifold),
|
||||||
_border_angle (border_angle),
|
_border_angle (border_angle),
|
||||||
_shape (NULL),
|
_shape (NULL),
|
||||||
_squared_radius (0.)
|
_squared_radius (squared_radius)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,11 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FT squared_radius()
|
||||||
|
{
|
||||||
|
return _squared_radius;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void estimate_neighborhood_squared_radius ()
|
void estimate_neighborhood_squared_radius ()
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,15 @@ private:
|
||||||
Point_vector m_points;
|
Point_vector m_points;
|
||||||
Facet_vector m_facets;
|
Facet_vector m_facets;
|
||||||
|
|
||||||
|
FT m_internal_squared_radius; // For backward compatibility
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Scale_space_surface_reconstruction_3 () { }
|
Scale_space_surface_reconstruction_3 () : m_internal_squared_radius(0.) { }
|
||||||
|
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
Scale_space_surface_reconstruction_3 (InputIterator begin, InputIterator end)
|
Scale_space_surface_reconstruction_3 (InputIterator begin, InputIterator end)
|
||||||
|
: m_internal_squared_radius (0.)
|
||||||
{
|
{
|
||||||
insert (begin, end);
|
insert (begin, end);
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +121,9 @@ public:
|
||||||
|
|
||||||
void increase_scale (std::size_t iterations = 1)
|
void increase_scale (std::size_t iterations = 1)
|
||||||
{
|
{
|
||||||
increase_scale (iterations, Weighted_PCA_smoother());
|
Weighted_PCA_smoother smoother;
|
||||||
|
increase_scale (iterations, smoother);
|
||||||
|
m_internal_squared_radius = smoother.squared_radius();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// constructs a triangle mesh from the point set at a fixed scale.
|
/// constructs a triangle mesh from the point set at a fixed scale.
|
||||||
|
|
@ -144,7 +149,8 @@ public:
|
||||||
|
|
||||||
void reconstruct_surface ()
|
void reconstruct_surface ()
|
||||||
{
|
{
|
||||||
reconstruct_surface (Alpha_shape_mesher());
|
CGAL_assertion (m_internal_squared_radius != 0.);
|
||||||
|
reconstruct_surface (Alpha_shape_mesher(m_internal_squared_radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// gives the number of points of the surface.
|
/// gives the number of points of the surface.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue