From e8247d6440c17f7029b9bfc9239dd87337a2dc52 Mon Sep 17 00:00:00 2001 From: Janis Born Date: Thu, 12 Jan 2017 17:09:27 +0100 Subject: [PATCH] add documentation for MidpointT --- Doc/subdivider.docu | 1 + .../Tools/Subdivider/Uniform/MidpointT.hh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Doc/subdivider.docu b/Doc/subdivider.docu index e6287ffa..a34d6318 100644 --- a/Doc/subdivider.docu +++ b/Doc/subdivider.docu @@ -14,6 +14,7 @@ subdivision: -# OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT -# OpenMesh::Subdivider::Uniform::CompositeT -# OpenMesh::Subdivider::Uniform::CatmullClarkT + -# OpenMesh::Subdivider::Uniform::MidpointT -# Adaptive subdivision -# OpenMesh::Subdivider::Adaptive::CompositeT -# Simple subdivision diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh index bb80618e..73b1e9f7 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh @@ -10,6 +10,19 @@ namespace OpenMesh { namespace Subdivider { namespace Uniform { +/** + * Midpoint subdivision algorithm. + * + * With every step, the set of vertices is replaced with by the midpoints of all + * current edges. Then, two sets of faces are created to set up the new + * connectivity: From all midpoints of edges surrounding an original face, a new + * face is created. Also, for all midpoints of edges surrounding an original + * vertex, a new face is created. + * + * @note This algorithm ignores the _update_points option. + * @note This algorithm is best suited for closed meshes since boundaries tend + * to fragment into isolated faces after a few iterations. + */ template class MidpointT : public SubdividerT { @@ -30,6 +43,8 @@ protected: // SubdividerT interface return true; } + //! Performs one step of Midpoint subdivision. + //! @note The _update_points option is ignored bool subdivide(mesh_t& _m, size_t _n, const bool _update_points = true) { PropertyManager, mesh_t> edge_midpoint(_m, "edge_midpoint");