re-correct the assert that was causing a failure. The previous commit tho marching cubes.h (done by me!) was rather wrong. Sorry,.

This commit is contained in:
Paolo Cignoni 2009-05-08 21:41:37 +00:00
parent 09ef413e51
commit 08ffe4b7a1
1 changed files with 3 additions and 1 deletions

View File

@ -707,7 +707,9 @@ namespace vcg
default: { assert(false); /* Invalid edge identifier */ }
} // end of switch
assert((vp - &_mesh->vert[0])>=0 && vertices_idx[vert]<_mesh->vert.size());
// Note that vp can be zero if we are in case 12 and that vertices_idx is surely >0 so the following assert has to be corrected as below.
// assert((vp - &_mesh->vert[0])>=0 && vertices_idx[vert]<_mesh->vert.size());
assert(vertices_idx[vert]<_mesh->vert.size());
} // end for (int vert=0 ...)
_mesh->face[face_idx].V(0) = &_mesh->vert[vertices_idx[0]];