Added function CleanAttributes() to delete all attributes (vertex, face, edge and mesh attributes)
This commit is contained in:
parent
ed0136c5bd
commit
499dc72c51
|
@ -357,25 +357,6 @@ public:
|
|||
/// Function to destroy the mesh
|
||||
void Clear()
|
||||
{
|
||||
// Clear attributes
|
||||
typename std::set< PointerToAttribute>::iterator i;
|
||||
for( i = vert_attr.begin(); i != vert_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
vert_attr.clear();
|
||||
|
||||
for( i = edge_attr.begin(); i != edge_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
edge_attr.clear();
|
||||
|
||||
for( i = face_attr.begin(); i != face_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
face_attr.clear();
|
||||
|
||||
for( i = mesh_attr.begin(); i != mesh_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
mesh_attr.clear();
|
||||
|
||||
|
||||
for(FaceIterator fi = face.begin(); fi != face.end(); ++fi)
|
||||
(*fi).Dealloc();
|
||||
vert.clear();
|
||||
|
@ -388,10 +369,32 @@ public:
|
|||
fn = 0;
|
||||
hn = 0;
|
||||
imark = 0;
|
||||
attrn = 0;
|
||||
C()=Color4b::Gray;
|
||||
}
|
||||
|
||||
|
||||
void ClearAttributes()
|
||||
{
|
||||
// Clear attributes
|
||||
typename std::set< PointerToAttribute>::iterator i;
|
||||
for (i = vert_attr.begin(); i != vert_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
vert_attr.clear();
|
||||
|
||||
for (i = edge_attr.begin(); i != edge_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
edge_attr.clear();
|
||||
|
||||
for (i = face_attr.begin(); i != face_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
face_attr.clear();
|
||||
|
||||
for (i = mesh_attr.begin(); i != mesh_attr.end(); ++i)
|
||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||
mesh_attr.clear();
|
||||
attrn = 0;
|
||||
}
|
||||
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return vert.empty() && edge.empty() && face.empty();
|
||||
|
|
Loading…
Reference in New Issue