Added function CleanAttributes() to delete all attributes (vertex, face, edge and mesh attributes)
This commit is contained in:
parent
ed0136c5bd
commit
499dc72c51
|
|
@ -356,6 +356,24 @@ public:
|
||||||
|
|
||||||
/// Function to destroy the mesh
|
/// Function to destroy the mesh
|
||||||
void Clear()
|
void Clear()
|
||||||
|
{
|
||||||
|
for(FaceIterator fi = face.begin(); fi != face.end(); ++fi)
|
||||||
|
(*fi).Dealloc();
|
||||||
|
vert.clear();
|
||||||
|
face.clear();
|
||||||
|
edge.clear();
|
||||||
|
// textures.clear();
|
||||||
|
// normalmaps.clear();
|
||||||
|
vn = 0;
|
||||||
|
en = 0;
|
||||||
|
fn = 0;
|
||||||
|
hn = 0;
|
||||||
|
imark = 0;
|
||||||
|
C()=Color4b::Gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ClearAttributes()
|
||||||
{
|
{
|
||||||
// Clear attributes
|
// Clear attributes
|
||||||
typename std::set< PointerToAttribute>::iterator i;
|
typename std::set< PointerToAttribute>::iterator i;
|
||||||
|
|
@ -374,22 +392,7 @@ public:
|
||||||
for (i = mesh_attr.begin(); i != mesh_attr.end(); ++i)
|
for (i = mesh_attr.begin(); i != mesh_attr.end(); ++i)
|
||||||
delete ((SimpleTempDataBase*)(*i)._handle);
|
delete ((SimpleTempDataBase*)(*i)._handle);
|
||||||
mesh_attr.clear();
|
mesh_attr.clear();
|
||||||
|
|
||||||
|
|
||||||
for(FaceIterator fi = face.begin(); fi != face.end(); ++fi)
|
|
||||||
(*fi).Dealloc();
|
|
||||||
vert.clear();
|
|
||||||
face.clear();
|
|
||||||
edge.clear();
|
|
||||||
// textures.clear();
|
|
||||||
// normalmaps.clear();
|
|
||||||
vn = 0;
|
|
||||||
en = 0;
|
|
||||||
fn = 0;
|
|
||||||
hn = 0;
|
|
||||||
imark = 0;
|
|
||||||
attrn = 0;
|
attrn = 0;
|
||||||
C()=Color4b::Gray;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEmpty() const
|
bool IsEmpty() const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue