diff --git a/Doc/subdivider.docu b/Doc/subdivider.docu index e6287ffad44e514310ae1644bd8bf9db7e071e02..a34d6318234a1d9d36c5712f792f1bc89284493e 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 bb80618ec18bc1cb9964d48240982985ebe27026..73b1e9f7469f2da99ddb306b1e13c2a54b5e02c8 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");