corrected a wrong assert in grid creation function

This commit is contained in:
Paolo Cignoni 2008-12-05 22:55:36 +00:00
parent e744ca1c0e
commit 0e13472efb
1 changed files with 3 additions and 4 deletions

View File

@ -598,7 +598,6 @@ void Build( MeshType & in, const V & v, const F & f)
typename V::const_iterator vi;
typename MeshType::VertexType tv;
// tv.Supervisor_Flags()=0;
for(int i=0;i<v.size();++i)
{
@ -660,13 +659,13 @@ void Grid(MeshType & in, int w, int h, float wl, float hl, float *data)
// Build a regular grid mesh of faces as a typical height field mesh
// Vertexes are assumed to be already present.
// Vertexes are assumed to be already be allocated.
template <class MeshType>
void FaceGrid(MeshType & in, int w, int h)
{
assert(in.vn == in.vert.size()); // require a compact vertex vector
assert(in.vn <= w*h); // the number of vertices should be large enough
assert(in.vn == (int)in.vert.size()); // require a compact vertex vector
assert(in.vn >= w*h); // the number of vertices should match the number of expected grid vertices
Allocator<MeshType>::AddFaces(in,(w-1)*(h-1)*2);