diff --git a/wrap/gl/gl_field.h b/wrap/gl/gl_field.h index c1b678d9..48dde889 100644 --- a/wrap/gl/gl_field.h +++ b/wrap/gl/gl_field.h @@ -71,16 +71,15 @@ class GLField // glEnd(); // } -// static void GLDrawVertField(const MeshType &mesh, -// const VertexType &v, -// ScalarType &size) -// { -// CoordType center=v.cP(); -// CoordType normal=v.cN(); -// CoordType dir[4]; -// vcg::tri::CrossField::CrossVector(v,dir); -// GLDrawField(dir,center,size); -// } + static void GLDrawVertField(const VertexType &v, + ScalarType &size) + { + CoordType center=v.cP(); + CoordType normal=v.cN(); + CoordType dir[4]; + vcg::tri::CrossField::CrossVector(v,dir); + GLDrawField(dir,center,size); + } public: @@ -105,18 +104,18 @@ public: glPopAttrib(); } - static void GLDrawVertField(const MeshType &mesh) + static void GLDrawVertField(const MeshType &mesh,ScalarType sizeF=0.01) { glPushAttrib(GL_ALL_ATTRIB_BITS); glDepthRange(0.0,0.9999); glEnable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); glDisable(GL_BLEND); - ScalarType size=mesh.bbox.Diag()/400.0; + ScalarType size=mesh.bbox.Diag()*sizeF; for (int i=0;i