diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh index 9db78b72..ef87efe9 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh @@ -143,8 +143,11 @@ protected: } - bool subdivide( mesh_t& _m, size_t _n) + bool subdivide( mesh_t& _m, size_t _n, const bool _update_positions = true) { + + ///TODO:Implement fixed positions + typename mesh_t::FaceIter fit, f_end; typename mesh_t::EdgeIter eit, e_end; typename mesh_t::VertexIter vit; @@ -169,7 +172,7 @@ protected: // Attention! Creating new edges, hence make sure the loop ends correctly. e_end = _m.edges_end(); for (eit=_m.edges_begin(); eit != e_end; ++eit) - split_edge(_m, eit.handle() ); + split_edge(_m, eit.handle() ); // Commit changes in topology and reconsitute consistency @@ -179,7 +182,6 @@ protected: for (fit = _m.faces_begin(); fit != f_end; ++fit) split_face(_m, fit.handle() ); - // Commit changes in geometry for ( vit = _m.vertices_begin(); vit != _m.vertices_end(); ++vit) @@ -207,7 +209,7 @@ private: using std::cos; #endif // 1 - // alpha(n) = ---- * (40 - ( 3 + 2 cos( 2 Pi / n ) )² ) + // alpha(n) = ---- * (40 - ( 3 + 2 cos( 2 Pi / n ) )� ) // 64 if (++valence) @@ -395,7 +397,7 @@ private: // geometry helper { typename mesh_t::Point pos(0.0,0.0,0.0); - if (_m.is_boundary(_vh)) // if boundary: Point 1-6-1 + if (_m.is_boundary(_vh) ) // if boundary: Point 1-6-1 { typename mesh_t::HalfedgeHandle heh, prev_heh; heh = _m.halfedge_handle( _vh ); diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh index efc84f2f..29901f93 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh @@ -174,8 +174,11 @@ protected: } - bool subdivide( mesh_t& _m, size_t _n) + bool subdivide( MeshType& _m, size_t _n , const bool _update_positions = true) { + + ///TODO:Implement fixed positions + typename mesh_t::FaceIter fit, f_end; typename mesh_t::EdgeIter eit, e_end; typename mesh_t::VertexIter vit; diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh index 12b59d7a..9dc56460 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh @@ -191,8 +191,11 @@ protected: } - bool subdivide( MeshType& _m, size_t _n ) + bool subdivide( MeshType& _m, size_t _n , const bool _update_positions = true) { + + ///TODO:Implement fixed positions + typename MeshType::VertexIter vit; typename MeshType::VertexVertexIter vvit; typename MeshType::EdgeIter eit; diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh index 6a324589..61e9e819 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh @@ -155,9 +155,11 @@ protected: return true; } - - bool subdivide( MeshType& _m, size_t _n ) + bool subdivide( MeshType& _m, size_t _n , const bool _update_positions = true) { + + ///TODO:Implement fixed positions + typename MeshType::VertexIter vit; typename MeshType::VertexVertexIter vvit; typename MeshType::EdgeIter eit; diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh index 5d7a61dc..8658faf4 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh @@ -118,9 +118,9 @@ public: /// \name Interface 1 //@{ /// Subdivide the mesh \c _m \c _n times. /// \see SubdividerT(MeshType&) - bool operator () ( MeshType& _m, size_t _n ) + bool operator () ( MeshType& _m, size_t _n , const bool _update_positions = true) { - return prepare(_m) && subdivide( _m, _n ) && cleanup( _m ); + return prepare(_m) && subdivide( _m, _n , _update_positions ) && cleanup( _m ); } //@} @@ -144,9 +144,9 @@ public: /// \name Interface 2 /// Subdivide the attached \c _n times. /// \see SubdividerT(), attach(), detach() - bool operator()( size_t _n ) + bool operator()( size_t _n , const bool _update_positions = true) { - return attached_ ? subdivide( *attached_, _n ) : false; + return attached_ ? subdivide( *attached_, _n , _update_positions) : false; } /// Detach an eventually attached mesh. @@ -169,7 +169,7 @@ protected: virtual bool prepare( MeshType& _m ) = 0; /// Subdivide mesh \c _m \c _n times - virtual bool subdivide( MeshType& _m, size_t _n ) = 0; + virtual bool subdivide( MeshType& _m, size_t _n, const bool _update_positions = true) = 0; /// Cleanup mesh after usage, e.g. remove added properties virtual bool cleanup( MeshType& _m ) = 0;