Commit 6b518742 by Jan Möbius

Merge branch 'midpoint_unittest' into 'master'

Midpoint unittest

See merge request !119
parents b3bd58a3 ca7abc7e
Pipeline #4153 passed with stage
in 40 minutes 43 seconds
......@@ -13,7 +13,7 @@ namespace Uniform {
/**
* Midpoint subdivision algorithm.
*
* With every step, the set of vertices is replaced with by the midpoints of all
* With every step, the set of vertices is replaced 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
......@@ -47,6 +47,10 @@ protected: // SubdividerT interface
//! @note The _update_points option is ignored
bool subdivide(mesh_t& _m, size_t _n, const bool _update_points = true)
{
_m.request_halfedge_status();
_m.request_edge_status();
_m.request_vertex_status();
_m.request_face_status();
PropertyManager<EPropHandleT<typename mesh_t::VertexHandle>, mesh_t> edge_midpoint(_m, "edge_midpoint");
PropertyManager<VPropHandleT<bool>, mesh_t> is_original_vertex(_m, "is_original_vertex");
......@@ -90,6 +94,7 @@ protected: // SubdividerT interface
_m.delete_vertex(vh);
}
}
_m.garbage_collection();
}
return true;
}
......
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