diff --git a/vcg/complex/algorithms/smooth.h b/vcg/complex/algorithms/smooth.h index 3b8b09f6..e0dbf468 100644 --- a/vcg/complex/algorithms/smooth.h +++ b/vcg/complex/algorithms/smooth.h @@ -54,6 +54,7 @@ class Smooth typedef typename MeshType::FacePointer FacePointer; typedef typename MeshType::FaceIterator FaceIterator; typedef typename MeshType::FaceContainer FaceContainer; + typedef typename MeshType::TetraType TetraType; typedef typename vcg::Box3 Box3Type; typedef typename vcg::face::VFIterator VFLocalIterator; @@ -215,7 +216,7 @@ class Smooth float weight = 1.0f; //if we are applying to a tetrahedral mesh: - ForEachTetra(m, [&](MeshType::TetraType &t) { + ForEachTetra(m, [&](TetraType &t) { for (int i = 0; i < 4; ++i) if (!t.IsB(i)) { @@ -238,7 +239,7 @@ class Smooth } }); - ForEachTetra(m, [&](MeshType::TetraType &t) { + ForEachTetra(m, [&](TetraType &t) { for (int i = 0; i < 4; ++i) if (t.IsB(i)) { @@ -257,7 +258,7 @@ class Smooth } }); - ForEachTetra(m, [&](MeshType::TetraType &t) { + ForEachTetra(m, [&](TetraType &t) { for (int i = 0; i < 4; ++i) if (t.IsB(i)) { diff --git a/vcg/complex/algorithms/stat.h b/vcg/complex/algorithms/stat.h index 0ae957db..64b9a2aa 100644 --- a/vcg/complex/algorithms/stat.h +++ b/vcg/complex/algorithms/stat.h @@ -311,7 +311,7 @@ public: assert(!math::IsNAN(t.Q()) && "You should never try to compute Histogram with Invalid Floating points numbers (NaN)"); h.Add(t.Q()); } - }) + }); } static void ComputePerTetraQualityHistogram(MeshType & m, Histogram & h, bool selectionOnly = false, int HistSize = 10000) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index 450ac3a7..728c6e5f 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -144,14 +144,14 @@ static void FaceArea(MeshType &m) static void TetraConstant(MeshType & m, const TetraQualityType q) { tri::RequirePerTetraQuality(m); - ForEachTetra(m, [&q] (MeshType::TetraType & t) { + ForEachTetra(m, [&q] (TetraType & t) { t.Q() = q; }); } static void TetraFromVolume(MeshType & m) { tri::RequirePerTetraQuality(m); - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { t.Q() = TetraQualityType(vcg::Tetra::ComputeVolume(t)); }); } @@ -159,7 +159,7 @@ static void TetraFromVolume(MeshType & m) static void TetraFromAspectRatio(MeshType & m) { tri::RequirePerTetraQuality(m); - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { t.Q() = TetraQualityType(vcg::Tetra::AspectRatio(t)); }); } diff --git a/vcg/complex/algorithms/update/selection.h b/vcg/complex/algorithms/update/selection.h index 9592ce2b..ae9d4d04 100644 --- a/vcg/complex/algorithms/update/selection.h +++ b/vcg/complex/algorithms/update/selection.h @@ -218,7 +218,7 @@ static size_t FaceAll(MeshType &m) /// \brief This function select all the tetras. static size_t TetraAll (MeshType & m) { - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { t.SetS(); }); @@ -252,7 +252,7 @@ static size_t FaceClear(MeshType &m) /// \brief This function clears the selection flag for all the tetras. static size_t TetraClear (MeshType & m) { - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { t.ClearS(); }); @@ -299,7 +299,7 @@ static size_t VertexCount(MeshType &m) static size_t TetraCount (MeshType & m) { size_t selCnt = 0; - ForEachTetra(m, [&selCnt] (MeshType::TetraType & t) { + ForEachTetra(m, [&selCnt] (TetraType & t) { if (t.IsS()) ++selCnt; }); @@ -358,7 +358,7 @@ static size_t VertexInvert(MeshType &m) static size_t TetraInvert (MeshType & m) { size_t selCnt = 0; - ForEachTetra(m, [&selCnt] (MeshType::TetraType & t) { + ForEachTetra(m, [&selCnt] (TetraType & t) { if (t.IsS()) t.ClearS(); else diff --git a/vcg/complex/algorithms/update/topology.h b/vcg/complex/algorithms/update/topology.h index 0cc2c5af..7af633ca 100644 --- a/vcg/complex/algorithms/update/topology.h +++ b/vcg/complex/algorithms/update/topology.h @@ -122,7 +122,7 @@ public: static void FillFaceVector (MeshType & m, std::vector & fvec) { - ForEachTetra(m, [&fvec] (MeshType::TetraType & t) { + ForEachTetra(m, [&fvec] (TetraType & t) { for (int i = 0; i < 4; ++i) fvec.push_back(PFace(&t, i)); }); @@ -320,7 +320,7 @@ static void AllocateEdge(MeshType &m) static void ClearTetraTetra (MeshType & m) { RequireTTAdjacency(m); - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { for (int i = 0; i < 4; ++i) { t.TTp(i) = NULL; @@ -437,12 +437,12 @@ static void VertexTetra(MeshType & m) RequireVTAdjacency(m); - ForEachVertex(m, [] (MeshType::VertexType & v) { + ForEachVertex(m, [] (VertexType & v) { v.VTp() = NULL; v.VTi() = 0; }); - ForEachTetra(m, [] (MeshType::TetraType & t) { + ForEachTetra(m, [] (TetraType & t) { //this works like this: the first iteration defines the end of the chain //then it backwards chains everything for (int i = 0; i < 4; ++i)