From 4b15067dd1f3c62baabfdd8715888c54e8accd4a Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Sun, 16 Feb 2014 16:37:39 +0000 Subject: [PATCH] minor modifications --- wrap/gl/gl_field.h | 102 ++++----------------------------------------- 1 file changed, 9 insertions(+), 93 deletions(-) diff --git a/wrap/gl/gl_field.h b/wrap/gl/gl_field.h index ec9bc9ed..f6be96c8 100644 --- a/wrap/gl/gl_field.h +++ b/wrap/gl/gl_field.h @@ -20,14 +20,14 @@ class GLField glLineWidth(2); vcg::glColor(vcg::Color4b(0,0,255,255)); glBegin(GL_LINES); - glVertex(center); + glVertex(center-dir[0]*size); glVertex(center+dir[0]*size); glEnd(); glLineWidth(2); vcg::glColor(vcg::Color4b(0,255,0,255)); glBegin(GL_LINES); - glVertex(center); + glVertex(center-dir[1]*size); glVertex(center+dir[1]*size); glEnd(); /*glLineWidth(1); @@ -84,55 +84,15 @@ class GLField public: -// ///singular vertices should be selected -// static void GLDrawSingularities(MeshType &mesh) -// { -// bool hasSingular = vcg::tri::HasPerVertexAttribute(mesh,std::string("Singular")); -// bool hasSingularDegree = vcg::tri::HasPerVertexAttribute(mesh,std::string("SingularityDegree")); - -// if (!hasSingular)return; - -// typename MeshType::template PerVertexAttributeHandle Handle_Singular; -// typename MeshType::template PerVertexAttributeHandle Handle_SingularDegree; - -// Handle_Singular=vcg::tri::Allocator::template GetPerVertexAttribute(mesh,std::string("Singular")); - -// Handle_SingularDegree=vcg::tri::Allocator::template GetPerVertexAttribute(mesh,std::string("SingularityDegree")); - -// glPushAttrib(GL_ALL_ATTRIB_BITS); -// glEnable(GL_COLOR_MATERIAL); -// glDisable(GL_LIGHTING); -// glDepthRange(0,0.999); -// ScalarType size=10; -// glPointSize(size); -// glBegin(GL_POINTS); -// for (unsigned int i=0;i > SeamsHandleType; -// typedef typename MeshType::template PerFaceAttributeHandle SeamsIndexHandleType; - -// typedef typename vcg::tri::Allocator SeamsAllocator; - -// SeamsHandleType Handle_Seam; -// Handle_Seam=SeamsAllocator::template GetPerFaceAttribute >(mesh,std::string("Seams")); - -// SeamsIndexHandleType Handle_SeamIndex; -// if (HasSeamIndex) -// Handle_SeamIndex=SeamsAllocator::template GetPerFaceAttribute(mesh,std::string("SeamsIndex")); - -// glPushAttrib(GL_ALL_ATTRIB_BITS); -// glEnable(GL_COLOR_MATERIAL); -// glDisable(GL_LIGHTING); - -// glDepthRange(0,0.999); -// for (unsigned int i=0;i seams=Handle_Seam[i]; -// vcg::Color4b seamCol[3]; -// for (int j=0;j<3;j++) -// { -// seamCol[j]=vcg::Color4b(0,255,0,255); -// if (HasSeamIndex) -// { -// int index=Handle_SeamIndex[i][j]; -// //assert(index>0); -// if (index>=0) -// seamCol[j]=vcg::Color4b::Scatter(100,index); -// } -// } - -// GLDrawFaceSeams(mesh.face[i],seams,seamCol); - -// } -// glPopAttrib(); -// } }; }