Added check for empty generated mesh (prevent call to mesh allocator with zero vertices or faces).

This commit is contained in:
Marco Di Benedetto 2006-05-19 20:49:03 +00:00
parent acf23d578f
commit f001cdf2e2
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.3 2006/05/18 22:20:53 m_di_benedetto
added check for deleted faces and modified/added std namespace qualifier.
Revision 1.2 2006/05/18 13:59:20 cignoni
Some minor optimizations
@ -206,6 +209,12 @@ class Clustering
void Extract(MeshType &m)
{
m.Clear();
if (TriSet.empty() || GridCell.empty())
{
return;
}
Allocator<MeshType>::AddVertices(m,GridCell.size());
STDEXT::hash_map<HashedPoint3i,CellType>::iterator gi;
int i=0;