diff --git a/vcg/complex/trimesh/clean.h b/vcg/complex/trimesh/clean.h index cf56a321..f5123eee 100644 --- a/vcg/complex/trimesh/clean.h +++ b/vcg/complex/trimesh/clean.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.39 2006/05/16 21:51:07 cignoni +Redesigned the function for the removal of faces according to their area and edge lenght + Revision 1.38 2006/05/03 21:40:27 cignoni Changed HasMark to HasPerFaceMark(m) and commented some unused internal vars of the class @@ -390,7 +393,7 @@ private: These functions can optionally take into account only the selected faces. */ template - static int RemoveFaceOutOfRangeAreaSel(MeshType& m, ScalarType MinAreaThr=0, ScalarType MaxAreaThr=numeric_limits::max()) + static int RemoveFaceOutOfRangeAreaSel(MeshType& m, ScalarType MinAreaThr=0, ScalarType MaxAreaThr=std::numeric_limits::max()) { FaceIterator fi; int count_fd = 0; @@ -411,7 +414,7 @@ private: return count_fd; } template - static int RemoveFaceOutOfRangeEdgeSel( MeshType& m, ScalarType MinEdgeThr=0, ScalarType MaxEdgeThr=numeric_limits::max()) + static int RemoveFaceOutOfRangeEdgeSel( MeshType& m, ScalarType MinEdgeThr=0, ScalarType MaxEdgeThr=std::numeric_limits::max()) { FaceIterator fi; int count_fd = 0; @@ -440,11 +443,11 @@ private: static int RemoveZeroAreaFace(MeshType& m) { return RemoveFaceOutOfRangeArea(m);} // Aliases for the functions that do not look at selection - static int RemoveFaceOutOfRangeArea(MeshType& m, ScalarType MinAreaThr=0, ScalarType MaxAreaThr=numeric_limits::max()) + static int RemoveFaceOutOfRangeArea(MeshType& m, ScalarType MinAreaThr=0, ScalarType MaxAreaThr=std::numeric_limits::max()) { - return RemoveFaceOutOfRangeArea(m,MinAreaThr,MaxAreaThr); + return RemoveFaceOutOfRangeAreaSel(m,MinAreaThr,MaxAreaThr); } - static int RemoveFaceOutOfRangeEdge(MeshType& m, ScalarType MinEdgeThr=0, ScalarType MaxEdgeThr=numeric_limits::max()) + static int RemoveFaceOutOfRangeEdge(MeshType& m, ScalarType MinEdgeThr=0, ScalarType MaxEdgeThr=std::numeric_limits::max()) { return RemoveFaceOutOfRangeEdgeSel(m,MinEdgeThr,MaxEdgeThr); } @@ -880,7 +883,7 @@ private: if (!fpaux->IsS()) { - SwapEdge(*fpaux, iaux); + face::SwapEdge(*fpaux, iaux); assert(CheckOrientation(*fpaux, iaux)); } else @@ -909,7 +912,7 @@ private: static void FlipMesh(MeshType &m) { for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) - SwapEdge((*fi), 0); + face::SwapEdge((*fi), 0); } static bool SelfIntersections(MeshType &m, std::vector &ret) { diff --git a/vcg/complex/trimesh/stat.h b/vcg/complex/trimesh/stat.h index 04160c64..05e2d7ae 100644 --- a/vcg/complex/trimesh/stat.h +++ b/vcg/complex/trimesh/stat.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2006/05/21 06:59:13 cignoni +Initial Commit + ****************************************************************************/ #ifndef __VCGLIB_TRIMESH_STAT @@ -61,7 +64,7 @@ class Stat static std::pair ComputePerVertexQualityMinMax( MeshType & m) // V1.0 { - std::pair minmax = make_pair(std::numeric_limits::max(),-std::numeric_limits::max()); + std::pair minmax = std::make_pair(std::numeric_limits::max(),-std::numeric_limits::max()); VertexIterator vi; for(vi = m.vert.begin(); vi != m.vert.end(); ++vi) @@ -86,8 +89,8 @@ class Stat static int ComputeEdgeHistogram( MeshType & m, Histogramf &h) // V1.0 { ScalarType Diag = m.bbox.Diag(); - h.clear(); - h.SetRange( 0, diagonale, 10000); + h.Clear(); + h.SetRange( 0, Diag, 10000); FaceIterator fi; for(fi = m.face.begin(); fi != m.face.end(); ++fi) { @@ -116,7 +119,8 @@ class Stat VertexIterator vi; for(vi = m.cm.vert.begin(); vi != m.cm.vert.end(); ++vi) (*vi).ClearS(); - } + return 0; + } }; // end class } //End Namespace tri diff --git a/vcg/simplex/faceplus/component_ocf.h b/vcg/simplex/faceplus/component_ocf.h index 5ee5ce09..8c96ccb6 100644 --- a/vcg/simplex/faceplus/component_ocf.h +++ b/vcg/simplex/faceplus/component_ocf.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.12 2006/05/03 21:37:02 cignoni +Added Optional Mark + Revision 1.11 2006/02/28 11:59:39 ponchio g++ compliance: @@ -391,7 +394,7 @@ public: static bool HasFaceMark() { return true; } static bool HasFaceMarkOcf() { return true; } - inline void InitIMark() { _imark = 0; } + inline void InitIMark() { IMark() = 0; } }; ///*-------------------------- WEDGE TEXCOORD ----------------------------------*/