Skip to content

Commit

Permalink
Move curvature map typedef to function
Browse files Browse the repository at this point in the history
  • Loading branch information
ipadjen committed Jul 10, 2023
1 parent b40debf commit 3ad5df3
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,16 @@ class Adaptive_sizing_field : public CGAL::Sizing_field<PolygonMesh>
typedef typename boost::property_map<PolygonMesh,
Vertex_property_tag>::type Vertex_sizing_map;

typedef Principal_curvatures_and_directions<K> Principal_curvatures;
typedef typename CGAL::dynamic_vertex_property_t<Principal_curvatures> Vertex_curvature_tag;
typedef typename boost::property_map<CGAL::Face_filtered_graph<PolygonMesh>,
Vertex_curvature_tag>::type Vertex_curvature_map;

Adaptive_sizing_field(const double tol
, const std::pair<FT, FT>& edge_len_min_max
, PolygonMesh& pmesh)
: tol(tol)
, m_short(edge_len_min_max.first)
, m_long(edge_len_min_max.second)
, m_pmesh(pmesh)
{
m_vertex_sizing_map = get(Vertex_property_tag(), m_pmesh);
}
Adaptive_sizing_field(const double tol
, const std::pair<FT, FT>& edge_len_min_max
, PolygonMesh& pmesh)
: tol(tol)
, m_short(edge_len_min_max.first)
, m_long(edge_len_min_max.second)
, m_pmesh(pmesh)
{
m_vertex_sizing_map = get(Vertex_property_tag(), m_pmesh);
}

private:
FT sqlength(const vertex_descriptor va,
Expand Down Expand Up @@ -105,6 +100,11 @@ class Adaptive_sizing_field : public CGAL::Sizing_field<PolygonMesh>
template <typename FaceGraph>
void calc_sizing_map(FaceGraph& face_graph)
{
typedef Principal_curvatures_and_directions<K> Principal_curvatures;
typedef typename CGAL::dynamic_vertex_property_t<Principal_curvatures> Vertex_curvature_tag;
typedef typename boost::property_map<FaceGraph,
Vertex_curvature_tag>::type Vertex_curvature_map;

#ifdef CGAL_PMP_REMESHING_VERBOSE
int oversize = 0;
int undersize = 0;
Expand Down Expand Up @@ -145,7 +145,7 @@ class Adaptive_sizing_field : public CGAL::Sizing_field<PolygonMesh>
}
}
#ifdef CGAL_PMP_REMESHING_VERBOSE
std::cout << " done (" << insize << " from curvature, "
std::cout << " done (" << insize << " from curvature, "
<< oversize << " set to max, "
<< undersize << " set to min)" << std::endl;
#endif
Expand Down

0 comments on commit 3ad5df3

Please sign in to comment.