Added new clean function removing only primitives

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@706 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2012-09-27 10:23:35 +00:00
parent 10b271fb56
commit c5874871e0
2 changed files with 28 additions and 9 deletions

View File

@@ -117,6 +117,21 @@ void ArrayKernel::garbage_collection(bool _v, bool _e, bool _f)
garbage_collection( empty_vh,empty_hh,empty_fh,_v, _e, _f);
}
void ArrayKernel::clean()
{
vertices_.clear();
VertexContainer().swap( vertices_ );
edges_.clear();
EdgeContainer().swap( edges_ );
faces_.clear();
FaceContainer().swap( faces_ );
}
void ArrayKernel::clear()
{
vprops_clear();
@@ -124,17 +139,11 @@ void ArrayKernel::clear()
hprops_clear();
fprops_clear();
vertices_.clear();
VertexContainer().swap( vertices_ );
edges_.clear();
EdgeContainer().swap( edges_ );
faces_.clear();
FaceContainer().swap( faces_ );
clean();
}
void ArrayKernel::resize( unsigned int _n_vertices, unsigned int _n_edges, unsigned int _n_faces )
{
vertices_.resize(_n_vertices);