mirror of https://github.com/CGAL/cgal
Merge pull request #5077 from FabienPean/patch-1
Add const qualifier for getters in MCF skeletonization
This commit is contained in:
commit
7dbb8f1411
|
|
@ -394,14 +394,14 @@ public:
|
||||||
|
|
||||||
/// During the local remeshing step, a triangle will be split
|
/// During the local remeshing step, a triangle will be split
|
||||||
/// if it has an angle larger than `max_triangle_angle()`.
|
/// if it has an angle larger than `max_triangle_angle()`.
|
||||||
double max_triangle_angle()
|
double max_triangle_angle() const
|
||||||
{
|
{
|
||||||
return m_alpha_TH;
|
return m_alpha_TH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// During the local remeshing step, an edge will be collapse
|
/// During the local remeshing step, an edge will be collapse
|
||||||
/// if it is length is less than `min_edge_length()`.
|
/// if it is length is less than `min_edge_length()`.
|
||||||
double min_edge_length()
|
double min_edge_length() const
|
||||||
{
|
{
|
||||||
return m_min_edge_length;
|
return m_min_edge_length;
|
||||||
}
|
}
|
||||||
|
|
@ -423,7 +423,7 @@ public:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/// Maximum number of iterations performed by `contract_until_convergence()`.
|
/// Maximum number of iterations performed by `contract_until_convergence()`.
|
||||||
std::size_t max_iterations()
|
std::size_t max_iterations() const
|
||||||
{
|
{
|
||||||
return m_max_iterations;
|
return m_max_iterations;
|
||||||
}
|
}
|
||||||
|
|
@ -432,7 +432,7 @@ public:
|
||||||
/// the meso-skeleton after one iteration is smaller than
|
/// the meso-skeleton after one iteration is smaller than
|
||||||
/// `area_variation_factor()*original_area` where `original_area` is the area of the input
|
/// `area_variation_factor()*original_area` where `original_area` is the area of the input
|
||||||
/// triangle mesh.
|
/// triangle mesh.
|
||||||
double area_variation_factor()
|
double area_variation_factor() const
|
||||||
{
|
{
|
||||||
return m_delta_area;
|
return m_delta_area;
|
||||||
}
|
}
|
||||||
|
|
@ -460,7 +460,7 @@ public:
|
||||||
/// faster, but results in a skeleton of lower quality.
|
/// faster, but results in a skeleton of lower quality.
|
||||||
/// This parameter corresponds to \f$ w_H \f$ in the original publication.
|
/// This parameter corresponds to \f$ w_H \f$ in the original publication.
|
||||||
/// \cgalAdvancedEnd
|
/// \cgalAdvancedEnd
|
||||||
double quality_speed_tradeoff()
|
double quality_speed_tradeoff() const
|
||||||
{
|
{
|
||||||
return m_omega_H;
|
return m_omega_H;
|
||||||
}
|
}
|
||||||
|
|
@ -469,7 +469,7 @@ public:
|
||||||
/// of the medial axis of the mesh during the contraction steps, so will be the result skeleton.
|
/// of the medial axis of the mesh during the contraction steps, so will be the result skeleton.
|
||||||
// (an additional energy is used during the contraction using the Voronoi poles of the input triangulated mesh
|
// (an additional energy is used during the contraction using the Voronoi poles of the input triangulated mesh
|
||||||
// as attractors).
|
// as attractors).
|
||||||
bool is_medially_centered()
|
bool is_medially_centered() const
|
||||||
{
|
{
|
||||||
return m_is_medially_centered;
|
return m_is_medially_centered;
|
||||||
}
|
}
|
||||||
|
|
@ -482,7 +482,7 @@ public:
|
||||||
/// It is only used if `is_medially_centered()==true`.
|
/// It is only used if `is_medially_centered()==true`.
|
||||||
/// This parameter corresponds to \f$ w_M \f$ in the original publication.
|
/// This parameter corresponds to \f$ w_M \f$ in the original publication.
|
||||||
/// \cgalAdvancedEnd
|
/// \cgalAdvancedEnd
|
||||||
double medially_centered_speed_tradeoff()
|
double medially_centered_speed_tradeoff() const
|
||||||
{
|
{
|
||||||
return m_omega_P;
|
return m_omega_P;
|
||||||
}
|
}
|
||||||
|
|
@ -526,7 +526,7 @@ public:
|
||||||
* @param fixed_points
|
* @param fixed_points
|
||||||
* return the positions of fixed points
|
* return the positions of fixed points
|
||||||
*/
|
*/
|
||||||
void fixed_points(std::vector<Point>& fixed_points)
|
void fixed_points(std::vector<Point>& fixed_points) const
|
||||||
{
|
{
|
||||||
fixed_points.clear();
|
fixed_points.clear();
|
||||||
for(vertex_descriptor vd : vertices(m_tmesh))
|
for(vertex_descriptor vd : vertices(m_tmesh))
|
||||||
|
|
@ -542,7 +542,7 @@ public:
|
||||||
* @param non_fixed_points
|
* @param non_fixed_points
|
||||||
* return the positions of non-fixed points
|
* return the positions of non-fixed points
|
||||||
*/
|
*/
|
||||||
void non_fixed_points(std::vector<Point>& non_fixed_points)
|
void non_fixed_points(std::vector<Point>& non_fixed_points) const
|
||||||
{
|
{
|
||||||
non_fixed_points.clear();
|
non_fixed_points.clear();
|
||||||
for(vertex_descriptor vd : vertices(m_tmesh))
|
for(vertex_descriptor vd : vertices(m_tmesh))
|
||||||
|
|
@ -558,7 +558,7 @@ public:
|
||||||
* @param max_poles
|
* @param max_poles
|
||||||
* for each surface mesh vertex, record its correspondent Voronoi pole position
|
* for each surface mesh vertex, record its correspondent Voronoi pole position
|
||||||
*/
|
*/
|
||||||
void poles(std::vector<Point>& max_poles)
|
void poles(std::vector<Point>& max_poles) const
|
||||||
{
|
{
|
||||||
max_poles.resize(num_vertices(m_tmesh));
|
max_poles.resize(num_vertices(m_tmesh));
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
@ -867,9 +867,6 @@ private:
|
||||||
m_vertex_id_count = static_cast<int>(num_vertices(m_tmesh));
|
m_vertex_id_count = static_cast<int>(num_vertices(m_tmesh));
|
||||||
m_max_id = m_vertex_id_count;
|
m_max_id = m_vertex_id_count;
|
||||||
|
|
||||||
if (m_is_medially_centered)
|
|
||||||
compute_voronoi_pole();
|
|
||||||
|
|
||||||
init_args();
|
init_args();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue