diff --git a/vcg/complex/trimesh/hole.h b/vcg/complex/trimesh/hole.h index dcc34c4c..e87b0925 100644 --- a/vcg/complex/trimesh/hole.h +++ b/vcg/complex/trimesh/hole.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.13 2006/11/07 11:47:11 cignoni +gcc compiling issues + Revision 1.12 2006/11/07 07:56:43 cignoni Added missing std:: @@ -150,7 +153,7 @@ namespace vcg { void Refresh(MESH &m) { - p.f = (MESH::FacePointer)(faceindex + &(*(m.face.begin()))); + p.f = (typename MESH::FacePointer)(faceindex + &(*(m.face.begin()))); } bool operator < (const HoleInfo & hh) const {return size < hh.size;} @@ -1136,6 +1139,9 @@ namespace vcg { { public: + using TrivialEar::e0; + using TrivialEar::e1; + using TrivialEar::quality; TrivialEarN(){} TrivialEarN(const face::Pos & ep) { diff --git a/vcg/complex/trimesh/smooth.h b/vcg/complex/trimesh/smooth.h index 307fe041..c168b800 100644 --- a/vcg/complex/trimesh/smooth.h +++ b/vcg/complex/trimesh/smooth.h @@ -23,6 +23,9 @@ /**************************************************************************** History $Log: not supported by cvs2svn $ +Revision 1.12 2006/11/07 11:28:02 cignoni +Added Quality weighted laplacian smoothing + Revision 1.11 2006/10/19 07:33:03 cignoni Corrected Laplacian, Added selection to HCSmooth @@ -677,7 +680,7 @@ void NormalSmooth(MESH_TYPE &m, for(fi=m.face.begin();fi!=m.face.end();++fi) { - CoordType bc=Barycenter(*fi); + CoordType bc=Barycenter(*fi); // 1) Clear all the selected flag of faces that are vertex-adjacent to fi for(i=0;i<3;++i) { @@ -824,7 +827,7 @@ void FastFitMesh(MESH_TYPE &m, VFLocalIterator ep(&*vi); for (;!ep.End();++ep) { - CoordType bc=Barycenter(*ep.F()); + CoordType bc=Barycenter(*ep.F()); Sum += ep.F()->N()*(ep.F()->N()*(bc - (*vi).P())); ++cnt; } diff --git a/vcg/complex/trimesh/update/normal.h b/vcg/complex/trimesh/update/normal.h index 53bcc287..9a784826 100644 --- a/vcg/complex/trimesh/update/normal.h +++ b/vcg/complex/trimesh/update/normal.h @@ -24,6 +24,10 @@ History $Log: not supported by cvs2svn $ +Revision 1.11 2005/12/06 18:22:31 pietroni +changed FaceType::ComputeNormal and FaceType::ComputeNormalizedNormal +with face::ComputeNormal and face::ComputeNormalizedNormal + Revision 1.10 2005/12/06 15:30:45 ponchio added #include triangle3.h for Normal(...) @@ -98,7 +102,7 @@ static void PerFace(ComputeMeshType &m) if( !m.HasPerFaceNormal()) return; FaceIterator f; for(f=m.face.begin();f!=m.face.end();++f) - if( !(*f).IsD() ) face::ComputeNormal(*f); + if( !(*f).IsD() ) /*face::*/ComputeNormal(*f); } diff --git a/vcg/math/disjoint_set.h b/vcg/math/disjoint_set.h index ba496ae9..f0e10b34 100644 --- a/vcg/math/disjoint_set.h +++ b/vcg/math/disjoint_set.h @@ -40,6 +40,16 @@ #include #include #define STDEXT __gnu_cxx +// It's terrible but gnu's hash_map needs an instantiation of hash() for +// every key type! So we cast the pointer to void* +namespace __gnu_cxx +{ + template <> class hash: private hash + { + public: + size_t operator()(const void *ptr) const { return hash::operator()((unsigned long)ptr); } + }; +} #endif #include @@ -68,7 +78,11 @@ namespace vcg typedef OBJECT_TYPE* ObjectPointer; typedef std::pair< ObjectPointer, int > hPair; +#ifdef __GNUC__ + typedef typename STDEXT::hash_map< /*ObjectPointer*/void*, int >::iterator hIterator; +#else typedef typename STDEXT::hash_map< ObjectPointer, int >::iterator hIterator; +#endif typedef std::pair< hIterator, bool > hInsertResult; public: @@ -132,9 +146,13 @@ namespace vcg } protected: +#ifdef __GNUC__ + STDEXT::hash_map< void*, int > inserted_objects; +#else STDEXT::hash_map< OBJECT_TYPE*, int > inserted_objects; +#endif std::vector< DisjointSetNode > nodes; }; };// end of namespace vcg -#endif //VCG_MATH_UNIONSET_H \ No newline at end of file +#endif //VCG_MATH_UNIONSET_H diff --git a/vcg/simplex/vertexplus/component_ocf.h b/vcg/simplex/vertexplus/component_ocf.h index a00751d9..3f769cbc 100644 --- a/vcg/simplex/vertexplus/component_ocf.h +++ b/vcg/simplex/vertexplus/component_ocf.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2006/11/07 11:29:24 cignoni +Corrected some errors in the reflections Has*** functions + Revision 1.4 2006/10/31 16:02:59 ganovelli vesione 2005 compliant @@ -278,7 +281,7 @@ namespace tri bool HasPerVertexQuality (const TriMesh < vert::vector_ocf< VertType > , FaceContainerType > & m) { if(VertType::HasQualityOcf()) return m.vert.IsQualityEnabled(); - else return VertexType::HasQuality(); + else return VertType::HasQuality(); } } diff --git a/vcg/space/normal_extrapolation.h b/vcg/space/normal_extrapolation.h index 792a2c3a..ba1051b0 100644 --- a/vcg/space/normal_extrapolation.h +++ b/vcg/space/normal_extrapolation.h @@ -236,18 +236,18 @@ namespace vcg E.push_back(MSTEdge(&tangent_planes[i], iRiemannianEdge->plane, iRiemannianEdge->weight)); std::sort( E.begin(), E.end() ); - vcg::DisjointSet set; + vcg::DisjointSet planeset; for (typename std::vector< Plane >::iterator iPlane=tangent_planes.begin(); iPlane!=ePlane; iPlane++) - set.MakeSet( &*iPlane ); + planeset.MakeSet( &*iPlane ); typename std::vector< MSTEdge >::iterator iMSTEdge = E.begin(); typename std::vector< MSTEdge >::iterator eMSTEdge = E.end(); std::vector< MSTEdge > unoriented_tree; Plane *u, *v; for ( ; iMSTEdge!=eMSTEdge; iMSTEdge++) - if ((u=set.FindSet(iMSTEdge->u))!=(v=set.FindSet(iMSTEdge->v))) - unoriented_tree.push_back( *iMSTEdge ), set.Union(u, v); + if ((u=planeset.FindSet(iMSTEdge->u))!=(v=planeset.FindSet(iMSTEdge->v))) + unoriented_tree.push_back( *iMSTEdge ), planeset.Union(u, v); E.clear(); // compute for each plane the list of sorting edges