diff --git a/vcg/complex/tetramesh/allocate.h b/vcg/complex/tetramesh/allocate.h index 26882f56..ed66fd22 100644 --- a/vcg/complex/tetramesh/allocate.h +++ b/vcg/complex/tetramesh/allocate.h @@ -24,8 +24,14 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/05/31 16:01:56 pietroni +added function addtetra + Revision 1.2 2004/05/14 15:14:34 turini -Added $Log: not supported by cvs2svn $ for CVS History Log +Added $Log: not supported by cvs2svn $ +Added Revision 1.3 2004/05/31 16:01:56 pietroni +Added added function addtetra +Added for CVS History Log Revision 1.1 2004/19/04 13:05 pietroni Initial commit @@ -85,18 +91,18 @@ possible vector realloc. restituisce l'iteratore al primo elemento aggiunto. */ -VertexIterator AddVertices(TetraMeshType &m,int n, vector &local_var) +static VertexIterator AddVertices(TetraMeshType &m,int n, vector &local_var) { VertexIterator oldbegin, newbegin; oldbegin = m.vert.begin(); VertexIterator last=m.vert.end(); - if(m.vert.empty()) last=0; // if the vector is empty we cannot find the last valid element + if(m.vert.empty()) last=(VertexIterator)0; // if the vector is empty we cannot find the last valid element else --last; unsigned int siz=0; #ifdef __STL_CONFIG_H -if(last!=0) distance(m.vert.begin(),last,siz); +if(last!=(VertexIterator)0) distance(m.vert.begin(),last,siz); #else -if(last!=0) siz=distance(m.vert.begin(),last); +if(last!=(VertexIterator)0) siz=distance(m.vert.begin(),last); #endif for(unsigned int i=0; i empty_var; + return AddVertices(m,n,empty_var); +} struct InsertedVT{ InsertedVT(VertexType *_v, @@ -206,7 +172,7 @@ struct InsertedVT{ /** Function to add n tetrafedron to the mesh. @param n number of vertices we want to add. */ -TetraIterator AddTetra(TetraMeshType &m,int n) +static TetraIterator AddTetra(TetraMeshType &m,int n) { TetraIterator last=m.tetra.end(); for (int i=0;i -void SubSetT(STL_CONT & subSet, TetraMeshType & m) +static void SubSetT(STL_CONT & subSet, TetraMeshType & m) { vector< InsertedVT > newVertices; - STL_CONT :: iterator pfi; + typename STL_CONT :: iterator pfi; newVertices.clear(); for(pfi = subSet.begin(); pfi != subSet.end(); ++pfi) @@ -240,7 +206,7 @@ void SubSetT(STL_CONT & subSet, TetraMeshType & m) sort(newVertices.begin(),newVertices.end()); - vector< InsertedVT >::iterator curr,next; + typename std::vector< InsertedVT >::iterator curr,next; int pos = 0; curr = next = newVertices.begin(); while( next != newVertices.end()) @@ -252,7 +218,7 @@ void SubSetT(STL_CONT & subSet, TetraMeshType & m) next++; } - vector::iterator newE = unique(newVertices.begin(),newVertices.end()); + typename std::vector::iterator newE = unique(newVertices.begin(),newVertices.end()); for(curr = newVertices.begin();curr!= newE;++curr) m.vert.push_back(*((*curr).v));