diff --git a/vcg/complex/trimesh/create/platonic.h b/vcg/complex/trimesh/create/platonic.h index 8967da78..a645ff47 100644 --- a/vcg/complex/trimesh/create/platonic.h +++ b/vcg/complex/trimesh/create/platonic.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2005/07/11 13:16:34 cignoni +small gcc-related compiling issues (typenames,ending cr, initialization order) + Revision 1.4 2005/07/01 11:17:06 cignoni Added option of passing a base mesh to Sphere for spherifying it @@ -611,6 +614,44 @@ void Build( MeshType & in, const V & v, const F & f) in.face.push_back(ft); } } + + +template +void Grid(MeshType & in, int w, int h, float wl, float hl, float *data) +{ + typedef typename MeshType::CoordType CoordType; + typedef typename MeshType::VertexPointer VertexPointer; + typedef typename MeshType::VertexIterator VertexIterator; + typedef typename MeshType::FaceIterator FaceIterator; + + in.Clear(); + Allocator::AddVertices(in,w*h); + Allocator::AddFaces(in,(w-1)*(h-1)*2); + + for(int i=0;i