minor changes
This commit is contained in:
parent
c2b6ba2390
commit
7a6aa07201
|
@ -71,16 +71,15 @@ class GLField
|
||||||
// glEnd();
|
// glEnd();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// static void GLDrawVertField(const MeshType &mesh,
|
static void GLDrawVertField(const VertexType &v,
|
||||||
// const VertexType &v,
|
ScalarType &size)
|
||||||
// ScalarType &size)
|
{
|
||||||
// {
|
CoordType center=v.cP();
|
||||||
// CoordType center=v.cP();
|
CoordType normal=v.cN();
|
||||||
// CoordType normal=v.cN();
|
CoordType dir[4];
|
||||||
// CoordType dir[4];
|
vcg::tri::CrossField<MeshType>::CrossVector(v,dir);
|
||||||
// vcg::tri::CrossField<MeshType>::CrossVector(v,dir);
|
GLDrawField(dir,center,size);
|
||||||
// GLDrawField(dir,center,size);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -105,18 +104,18 @@ public:
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GLDrawVertField(const MeshType &mesh)
|
static void GLDrawVertField(const MeshType &mesh,ScalarType sizeF=0.01)
|
||||||
{
|
{
|
||||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||||
glDepthRange(0.0,0.9999);
|
glDepthRange(0.0,0.9999);
|
||||||
glEnable(GL_COLOR_MATERIAL);
|
glEnable(GL_COLOR_MATERIAL);
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
ScalarType size=mesh.bbox.Diag()/400.0;
|
ScalarType size=mesh.bbox.Diag()*sizeF;
|
||||||
for (int i=0;i<mesh.vert.size();i++)
|
for (int i=0;i<mesh.vert.size();i++)
|
||||||
{
|
{
|
||||||
if (mesh.vert[i].IsD())continue;
|
if (mesh.vert[i].IsD())continue;
|
||||||
GLDrawVertField(mesh,mesh.vert[i],size);
|
GLDrawVertField(mesh.vert[i],size);
|
||||||
}
|
}
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue