Commit e8247d64 authored by Janis Born's avatar Janis Born

add documentation for MidpointT

parent ecb15612
Pipeline #4123 passed with stage
in 40 minutes and 52 seconds
...@@ -14,6 +14,7 @@ subdivision: ...@@ -14,6 +14,7 @@ subdivision:
-# OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT -# OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT
-# OpenMesh::Subdivider::Uniform::CompositeT -# OpenMesh::Subdivider::Uniform::CompositeT
-# OpenMesh::Subdivider::Uniform::CatmullClarkT -# OpenMesh::Subdivider::Uniform::CatmullClarkT
-# OpenMesh::Subdivider::Uniform::MidpointT
-# Adaptive subdivision -# Adaptive subdivision
-# OpenMesh::Subdivider::Adaptive::CompositeT -# OpenMesh::Subdivider::Adaptive::CompositeT
-# Simple subdivision -# Simple subdivision
......
...@@ -10,6 +10,19 @@ namespace OpenMesh { ...@@ -10,6 +10,19 @@ namespace OpenMesh {
namespace Subdivider { namespace Subdivider {
namespace Uniform { 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<typename MeshType, typename RealType = double> template<typename MeshType, typename RealType = double>
class MidpointT : public SubdividerT<MeshType, RealType> class MidpointT : public SubdividerT<MeshType, RealType>
{ {
...@@ -30,6 +43,8 @@ protected: // SubdividerT interface ...@@ -30,6 +43,8 @@ protected: // SubdividerT interface
return true; 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) bool subdivide(mesh_t& _m, size_t _n, const bool _update_points = true)
{ {
PropertyManager<EPropHandleT<typename mesh_t::VertexHandle>, mesh_t> edge_midpoint(_m, "edge_midpoint"); PropertyManager<EPropHandleT<typename mesh_t::VertexHandle>, mesh_t> edge_midpoint(_m, "edge_midpoint");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment