diff --git a/vcg/complex/algorithms/create/platonic.h b/vcg/complex/algorithms/create/platonic.h index 4c3ce8d1..d89e8d23 100644 --- a/vcg/complex/algorithms/create/platonic.h +++ b/vcg/complex/algorithms/create/platonic.h @@ -588,24 +588,26 @@ void Build( MeshType & in, const V & v, const F & f) // Once generated the vertex positions it uses the FaceGrid function to generate the faces; template -void Grid(MeshType & in, int w, int h, float wl, float hl, float *data) +void Grid(MeshType & in, int w, int h, float wl, float hl, float *data=0) { - typedef typename MeshType::CoordType CoordType; - typedef typename MeshType::VertexPointer VertexPointer; - typedef typename MeshType::VertexIterator VertexIterator; - typedef typename MeshType::FaceIterator FaceIterator; + 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::AddVertices(in,w*h); float wld=wl/float(w-1); float hld=hl/float(h-1); - + float zVal=0; for(int i=0;i::Translate(square,Point3f(-5.0f,-5.0f,0.0f)); + tri::UpdatePosition::Translate(square,Point3f(-width/2.0f,-height/2.0f,0.0f)); if(angleDeg!=0){ tri::UpdatePosition::Translate(square,preRotTra); rotM.SetRotateDeg(angleDeg,dir);