Introduce ArrayKernel::clean_keep_reservation().
This commit is contained in:
@@ -177,6 +177,16 @@ void ArrayKernel::garbage_collection(bool _v, bool _e, bool _f)
|
||||
garbage_collection( empty_vh,empty_hh,empty_fh,_v, _e, _f);
|
||||
}
|
||||
|
||||
void ArrayKernel::clean_keep_reservation()
|
||||
{
|
||||
vertices_.clear();
|
||||
|
||||
edges_.clear();
|
||||
|
||||
faces_.clear();
|
||||
|
||||
}
|
||||
|
||||
void ArrayKernel::clean()
|
||||
{
|
||||
|
||||
|
||||
@@ -306,6 +306,14 @@ public:
|
||||
*/
|
||||
void clean();
|
||||
|
||||
/** \brief Reset the whole mesh
|
||||
*
|
||||
* This will remove all elements from the mesh but keeps the properties.
|
||||
* In contrast to clean() the memory used for the elements will remain
|
||||
* allocated.
|
||||
*/
|
||||
void clean_keep_reservation();
|
||||
|
||||
// --- number of items ---
|
||||
size_t n_vertices() const { return vertices_.size(); }
|
||||
size_t n_halfedges() const { return 2*edges_.size(); }
|
||||
|
||||
Reference in New Issue
Block a user