Added patch to speed up add_face function. Thanks to Stephen Webb

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@406 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2011-09-01 10:04:15 +00:00
parent 025b962924
commit d27c282b9b
2 changed files with 57 additions and 51 deletions

View File

@@ -689,6 +689,20 @@ protected:
void collapse_edge(HalfedgeHandle _hh);
/// Helper for halfedge collapse
void collapse_loop(HalfedgeHandle _hh);
private: // Working storage for add_face()
struct AddFaceEdgeInfo
{
HalfedgeHandle halfedge_handle;
bool is_new;
bool needs_adjust;
};
std::vector<AddFaceEdgeInfo> edgeData_; //
std::vector<std::pair<HalfedgeHandle, HalfedgeHandle> > next_cache_; // cache for set_next_halfedge and vertex' set_halfedge
uint next_cache_count_;
};
}//namespace OpenMesh