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:
@@ -117,12 +117,8 @@ void ArrayKernel::garbage_collection(bool _v, bool _e, bool _f)
|
||||
garbage_collection( empty_vh,empty_hh,empty_fh,_v, _e, _f);
|
||||
}
|
||||
|
||||
void ArrayKernel::clear()
|
||||
void ArrayKernel::clean()
|
||||
{
|
||||
vprops_clear();
|
||||
eprops_clear();
|
||||
hprops_clear();
|
||||
fprops_clear();
|
||||
|
||||
vertices_.clear();
|
||||
VertexContainer().swap( vertices_ );
|
||||
@@ -135,6 +131,19 @@ void ArrayKernel::clear()
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ArrayKernel::clear()
|
||||
{
|
||||
vprops_clear();
|
||||
eprops_clear();
|
||||
hprops_clear();
|
||||
fprops_clear();
|
||||
|
||||
clean();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ArrayKernel::resize( unsigned int _n_vertices, unsigned int _n_edges, unsigned int _n_faces )
|
||||
{
|
||||
vertices_.resize(_n_vertices);
|
||||
|
||||
@@ -303,8 +303,18 @@ public:
|
||||
std_API_Container_FHandlePointer& fh_to_update,
|
||||
bool _v=true, bool _e=true, bool _f=true);
|
||||
|
||||
/** \brief Clear the whole mesh
|
||||
*
|
||||
* This will remove all properties and elements from the mesh
|
||||
*/
|
||||
void clear();
|
||||
|
||||
/** \brief Reset the whole mesh
|
||||
*
|
||||
* This will remove all elements from the mesh but keeps the properties
|
||||
*/
|
||||
void clean();
|
||||
|
||||
// --- number of items ---
|
||||
unsigned int n_vertices() const { return vertices_.size(); }
|
||||
unsigned int n_halfedges() const { return 2*edges_.size(); }
|
||||
|
||||
Reference in New Issue
Block a user