diff --git a/vcg/complex/algorithms/crease_cut.h b/vcg/complex/algorithms/crease_cut.h index eccb68d1..b57b9614 100644 --- a/vcg/complex/algorithms/crease_cut.h +++ b/vcg/complex/algorithms/crease_cut.h @@ -2,7 +2,7 @@ * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * -* Copyright(C) 2004-2016 \/)\/ * +* Copyright(C) 2004-2017 \/)\/ * * Visual Computing Lab /\/| * * ISTI - Italian National Research Council | * * \ * @@ -25,6 +25,7 @@ #define __VCG_CREASE_CUT #include #include +#include namespace vcg { namespace tri { @@ -49,11 +50,11 @@ void CreaseCut(MESH_TYPE &m, float angleRad) template void CutMeshAlongNonFauxEdges(MESH_TYPE &m) { - typedef typename MESH_TYPE::FaceIterator FaceIterator; - typedef typename MESH_TYPE::FaceType FaceType; + typedef typename MESH_TYPE::FaceIterator FaceIterator; + typedef typename MESH_TYPE::FaceType FaceType; tri::Allocator::CompactVertexVector(m); - tri::Allocator::CompactFaceVector(m); + tri::Allocator::CompactFaceVector(m); tri::RequireFFAdjacency(m); tri::UpdateFlags::VertexClearV(m); @@ -82,7 +83,7 @@ void CutMeshAlongNonFauxEdges(MESH_TYPE &m) } int locCreaseCounter=0; - int curVertexCounter =vertInd; + int curVertexCounter=vertInd; do { // The real Loop size_t faceInd = Index(m,iPos.F()); @@ -96,13 +97,13 @@ void CutMeshAlongNonFauxEdges(MESH_TYPE &m) } iPos.NextFE(); } while (startPos!=iPos); - if(locCreaseCounter>0 && (!isBorderVertex) ) newVertexCounter--; + if (locCreaseCounter > 0) newVertexCounter--; //printf("For vertex %i found %i creases\n",vertInd,locCreaseCounter); } } // end foreach face/vert - // Now the indVec vector contains for each the new index of each vertex (duplicated as necessary) - // We do a second loop to copy split vertexes into new positions + // Now the indVec vector contains for each face wedge the new index of each vertex (duplicated as necessary) + // We do a second loop to copy split vertices into new positions tri::Allocator::AddVertices(m,newVertexCounter-m.vn); tri::UpdateFlags::VertexClearV(m); @@ -110,11 +111,10 @@ void CutMeshAlongNonFauxEdges(MESH_TYPE &m) for(int j=0;j<3;++j) { size_t faceInd = Index(m, *fi); - size_t vertInd = Index(m, (*fi).V(j)); int curVertexInd = indVec[faceInd*3+ j]; assert(curVertexInd != -1); assert(curVertexInd < m.vn); - if(curVertexInd < startVn) assert(size_t(curVertexInd) == vertInd); + if(curVertexInd < startVn) { assert(size_t(curVertexInd) == Index(m, (*fi).V(j))); } if(curVertexInd >= startVn) { m.vert[curVertexInd].ImportData(*((*fi).V(j))); diff --git a/vcg/complex/algorithms/hole.h b/vcg/complex/algorithms/hole.h index c906ccb6..ed687fb7 100644 --- a/vcg/complex/algorithms/hole.h +++ b/vcg/complex/algorithms/hole.h @@ -378,7 +378,7 @@ public: { int e0,e1; bool ret=face::FindSharedEdge(f,*it,e0,e1); - assert(ret); + assert(ret); (void)ret; if(!face::IsBorder(**it,e1)) return false; } diff --git a/vcg/space/index/spatial_hashing.h b/vcg/space/index/spatial_hashing.h index 5dc30655..24f64a96 100644 --- a/vcg/space/index/spatial_hashing.h +++ b/vcg/space/index/spatial_hashing.h @@ -64,7 +64,7 @@ namespace vcg{ /** Spatial Hash Table Spatial Hashing as described in - "Optimized Spatial Hashing for Coll ision Detection of Deformable Objects", + "Optimized Spatial Hashing for Collision Detection of Deformable Objects", Matthias Teschner and Bruno Heidelberger and Matthias Muller and Danat Pomeranets and Markus Gross */ template < typename ObjType,class FLT=double>