13 template <
class Refs,
class T>
35 void set_tag(std::size_t tag){m_tag = tag;}
46 Point& p0 = this->halfedge()->vertex()->point();
47 Point& p1 = this->halfedge()->next()->vertex()->point();
48 Point& p2 = this->halfedge()->next()->next()->vertex()->point();
49 m_area = std::sqrt(
Triangle(p0, p1, p2).squared_area());
50 m_normal =
normalize(K::Plane_3(p0, p1, p2).orthogonal_vector());
59 template <
class Refs,
class Tprev,
class Tvertex,
class Tface>
60 class Enriched_halfedge :
public CGAL::HalfedgeDS_halfedge_base<Refs, Tprev, Tvertex, Tface>
72 void set_tag(std::size_t tag){m_tag = tag;}
79 template <
class Refs,
class T>
83 double mp_kmax, mp_kmin, courbureMSDM;
84 double courbureMoyenne, courbureVariance, courbureCoVariance;
97 inline std::size_t
get_tag()
const {
return m_tag;}
101 inline void set_tag(std::size_t tag){m_tag = tag;}
171 template <
class Refs,
class Traits>
175 template <
class Refs,
class Traits>
179 template <
class Refs,
class Traits>
188 template <
class kernel,
class items>
205 std::size_t facet_id = 0;
206 Polyhedron::Facet_iterator fit = facets_begin();
207 CGAL_For_all (fit, facets_end())
209 fit->set_tag(facet_id++);
212 Polyhedron::Vertex_iterator vi = vertices_begin();
213 std::size_t vertex_id = 0;
214 m_bbox = CGAL::Bbox_3(points_begin()->bbox());
215 CGAL_For_all(vi, vertices_end())
217 vi->set_tag(vertex_id++);
218 m_bbox += vi->point().bbox();
220 double X = m_bbox.xmax() - m_bbox.xmin();
221 double Y = m_bbox.ymax() - m_bbox.ymin();
222 double Z = m_bbox.zmax() - m_bbox.zmin();
223 maxDim = std::max(std::max(X, Y), Z);
double get_kmax() const
Getter to maximum curvature.
Definition: enriched_polyhedron.h:105
const Vector_3 & normal() const
Return facet normal vector.
Definition: enriched_polyhedron.h:27
void set_tag(std::size_t tag)
Setter to facet tag.
Definition: enriched_polyhedron.h:35
void set_kmax(double kmax)
Setter to maximum curvature.
Definition: enriched_polyhedron.h:109
void set_courbureMSDM(double value)
Setter to MSDM scaled mean curvature.
Definition: enriched_polyhedron.h:125
void update()
Update internal data on the facet.
Definition: enriched_polyhedron.h:44
std::size_t get_tag() const
Getter to vertex tag.
Definition: enriched_polyhedron.h:97
Wrapper for the face used in the custom polyhedron.
Definition: enriched_polyhedron.h:176
double get_area() const
Getter to surface area of the triangle facet.
Definition: enriched_polyhedron.h:38
double get_courbureMSDM() const
Getter to MSDM scaled mean curvature.
Definition: enriched_polyhedron.h:121
double get_kmin() const
Getter to minimum curvature.
Definition: enriched_polyhedron.h:113
double get_courbureVariance() const
Getter to the local weighted variance of maximum curvatures.
Definition: enriched_polyhedron.h:147
Wrapper for the halfedge used in the custom polyhedron.
Definition: enriched_polyhedron.h:180
double get_courbureCoVariance() const
Getter to the local weighted covariance of maximum curvatures.
Definition: enriched_polyhedron.h:155
std::size_t get_tag()
Getter to halfedge tag.
Definition: enriched_polyhedron.h:68
double getMaxDim() const
Return the maximum of the bounding box sides.
Definition: enriched_polyhedron.h:227
void set_courbureMoyenne(double value)
Setter to the local weighted average of maximum curvatures.
Definition: enriched_polyhedron.h:143
void set_tag(std::size_t tag)
Setter to halfedge tag.
Definition: enriched_polyhedron.h:72
Enriched vertex with a tag and maximum principale curvature.
Definition: enriched_polyhedron.h:80
Enriched_vertex()
Default constructor.
Definition: enriched_polyhedron.h:88
void set_courbureCoVariance(double value)
Setter to the local weighted covariance of maximum curvatures.
Definition: enriched_polyhedron.h:159
double get_courbureMoyenne() const
Getter to the local weighted average of maximum curvatures.
Definition: enriched_polyhedron.h:134
void set_courbureVariance(double value)
Setter to the local weighted variance of maximum curvatures.
Definition: enriched_polyhedron.h:151
A redefined items class for the Polyhedron_3.
Definition: enriched_polyhedron.h:168
Enriched facet for CGAL polyhedron adding normal and tag information.
Definition: enriched_polyhedron.h:14
void set_tag(std::size_t tag)
Setter to vertex tag.
Definition: enriched_polyhedron.h:101
Polyhedron class for the MSDM computation.
Definition: enriched_polyhedron.h:189
void construct()
Build information on facet, vertices, surface and bounding box.
Definition: enriched_polyhedron.h:203
void set_kmin(double kmin)
Setter to minimum curvature.
Definition: enriched_polyhedron.h:117
Enriched_vertex(const Point &pt)
Constructor of vertex at a given location.
Definition: enriched_polyhedron.h:93
Enriched halfedge for CGAL polyhedron adding tag information.
Definition: enriched_polyhedron.h:60
Wrapper for the vertex used in the custom polyhedron.
Definition: enriched_polyhedron.h:172
std::size_t get_tag()
Getter to facet tag.
Definition: enriched_polyhedron.h:31