From 7c0f42c4d74691563459f31a52dbe7353004a179 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 25 Nov 2013 10:35:39 +0000 Subject: [PATCH] Include header cleaning and reordering. --- vcg/complex/algorithms/update/fitmaps.h | 5 ---- .../algorithms/update/halfedge_indexed.h | 27 +++++++++---------- .../algorithms/update/halfedge_topology.h | 6 ----- vcg/complex/algorithms/update/quality.h | 26 ++++++++---------- 4 files changed, 23 insertions(+), 41 deletions(-) diff --git a/vcg/complex/algorithms/update/fitmaps.h b/vcg/complex/algorithms/update/fitmaps.h index 76b5f557..1b96333b 100644 --- a/vcg/complex/algorithms/update/fitmaps.h +++ b/vcg/complex/algorithms/update/fitmaps.h @@ -27,10 +27,7 @@ #include #include -#include #include -#include -#include #include #include #include @@ -42,8 +39,6 @@ #include #include -#include - #include #include diff --git a/vcg/complex/algorithms/update/halfedge_indexed.h b/vcg/complex/algorithms/update/halfedge_indexed.h index 459bb959..61dfa787 100644 --- a/vcg/complex/algorithms/update/halfedge_indexed.h +++ b/vcg/complex/algorithms/update/halfedge_indexed.h @@ -8,7 +8,7 @@ * \ * * All rights reserved. * * * -* This program is free software; you can redistribute it and/or modify * +* This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * @@ -24,11 +24,8 @@ #ifndef __VCGLIB_HALFEDGE_ #define __VCGLIB_HALFEDGE_ -#include -#include #include #include -#include #include namespace vcg @@ -56,8 +53,8 @@ namespace vcg struct VertexPairEdgePtr{ VertexPairEdgePtr(VertexPointer _v0,VertexPointer _v1,HEdgePointer _ep):v0(_v0),v1(_v1),ep(_ep){if(v0>v1) std::swap(v0,v1);} - const bool operator <(const VertexPairEdgePtr &o) const {return (v0 == o.v0)? (v1HEp()) return false; //halfedge must point to an edge @@ -368,7 +365,7 @@ namespace vcg if( ep->HNp()->IsD()) return false; // - if(hasHP) + if(hasHP) if( ep->HNp()->HPp() != ep) return false; // @@ -467,9 +464,9 @@ namespace vcg /** Adds an edge between the sources of e0 and e1 and set all the topology relations. If the edges store the pointers to the faces then a new face is created. <--- e1 ---- X <------e1_HEPp--- - ^ + ^ || - ei0 || ei1 + ei0 || ei1 || v ----e0_HEPp-> X ----- e0 ------> @@ -526,9 +523,9 @@ namespace vcg /** Detach the topology relations of a given edge <--- e->HENPp -X --- <---------eO_HEPp--- - ^ + ^ || - e || e->HEOp() + e || e->HEOp() || v ----e_HEPp--> X ----- e->HEOp->HENPp() ------> @@ -589,8 +586,8 @@ namespace vcg struct VertexPairEdgePtr{ VertexPairEdgePtr(VertexPointer _v0,VertexPointer _v1,HEdgePointer _ep):v0(_v0),v1(_v1),ep(_ep){if(v0>v1) std::swap(v0,v1);} - const bool operator <(const VertexPairEdgePtr &o) const {return (v0 == o.v0)? (v1 vpts; do{vpts.push_back((*ep).HVp()); ep=ep->HNp();}while(ep!=epF); //int idbg =fp->VN(); - if(fp->VN() != vpts.size()){ + if(size_t(fp->VN()) != vpts.size()){ fp->Dealloc(); fp ->Alloc(vpts.size()); } diff --git a/vcg/complex/algorithms/update/halfedge_topology.h b/vcg/complex/algorithms/update/halfedge_topology.h index 09229b5e..5a0f4ce3 100644 --- a/vcg/complex/algorithms/update/halfedge_topology.h +++ b/vcg/complex/algorithms/update/halfedge_topology.h @@ -2,12 +2,6 @@ #define VCG_HEDGE_TOPOLOGY #include -#include - -#include -#include -#include -#include using namespace std; using namespace vcg::hedge; diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index 711864ca..90a63247 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -26,10 +26,6 @@ #include #include #include -#include -#include -#include -#include namespace vcg { namespace tri { @@ -212,14 +208,14 @@ static void VertexFromMeanCurvatureDir(MeshType &m) static void VertexFromAbsoluteCurvature(MeshType &m) { - VertexIterator vi; - for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) - { - if((*vi).Kg() >= 0) - (*vi).Q() = math::Abs( 2*(*vi).Kh() ); - else - (*vi).Q() = 2*math::Sqrt(math::Abs( (*vi).Kh()*(*vi).Kh() - (*vi).Kg())); - } + VertexIterator vi; + for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) + { + if((*vi).Kg() >= 0) + (*vi).Q() = math::Abs( 2*(*vi).Kh() ); + else + (*vi).Q() = 2*math::Sqrt(math::Abs( (*vi).Kh()*(*vi).Kh() - (*vi).Kg())); + } } /* @@ -231,9 +227,9 @@ static void VertexFromAbsoluteCurvature(MeshType &m) */ static void VertexFromRMSCurvature(MeshType &m) { - VertexIterator vi; - for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) - (*vi).Q() = math::Sqrt(math::Abs( 4*(*vi).Kh()*(*vi).Kh() - 2*(*vi).Kg())); + VertexIterator vi; + for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) + (*vi).Q() = math::Sqrt(math::Abs( 4*(*vi).Kh()*(*vi).Kh() - 2*(*vi).Kg())); }