more bugs under gcc/clang 2 (checked compilation under windows wsl)
This commit is contained in:
parent
c92ccb5656
commit
8ce27cfcf8
|
|
@ -54,6 +54,7 @@ class Smooth
|
||||||
typedef typename MeshType::FacePointer FacePointer;
|
typedef typename MeshType::FacePointer FacePointer;
|
||||||
typedef typename MeshType::FaceIterator FaceIterator;
|
typedef typename MeshType::FaceIterator FaceIterator;
|
||||||
typedef typename MeshType::FaceContainer FaceContainer;
|
typedef typename MeshType::FaceContainer FaceContainer;
|
||||||
|
typedef typename MeshType::TetraType TetraType;
|
||||||
typedef typename vcg::Box3<ScalarType> Box3Type;
|
typedef typename vcg::Box3<ScalarType> Box3Type;
|
||||||
typedef typename vcg::face::VFIterator<FaceType> VFLocalIterator;
|
typedef typename vcg::face::VFIterator<FaceType> VFLocalIterator;
|
||||||
|
|
||||||
|
|
@ -215,7 +216,7 @@ class Smooth
|
||||||
float weight = 1.0f;
|
float weight = 1.0f;
|
||||||
|
|
||||||
//if we are applying to a tetrahedral mesh:
|
//if we are applying to a tetrahedral mesh:
|
||||||
ForEachTetra(m, [&](MeshType::TetraType &t) {
|
ForEachTetra(m, [&](TetraType &t) {
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
if (!t.IsB(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)
|
for (int i = 0; i < 4; ++i)
|
||||||
if (t.IsB(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)
|
for (int i = 0; i < 4; ++i)
|
||||||
if (t.IsB(i))
|
if (t.IsB(i))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ public:
|
||||||
assert(!math::IsNAN(t.Q()) && "You should never try to compute Histogram with Invalid Floating points numbers (NaN)");
|
assert(!math::IsNAN(t.Q()) && "You should never try to compute Histogram with Invalid Floating points numbers (NaN)");
|
||||||
h.Add(t.Q());
|
h.Add(t.Q());
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ComputePerTetraQualityHistogram(MeshType & m, Histogram<ScalarType> & h, bool selectionOnly = false, int HistSize = 10000)
|
static void ComputePerTetraQualityHistogram(MeshType & m, Histogram<ScalarType> & h, bool selectionOnly = false, int HistSize = 10000)
|
||||||
|
|
|
||||||
|
|
@ -144,14 +144,14 @@ static void FaceArea(MeshType &m)
|
||||||
static void TetraConstant(MeshType & m, const TetraQualityType q)
|
static void TetraConstant(MeshType & m, const TetraQualityType q)
|
||||||
{
|
{
|
||||||
tri::RequirePerTetraQuality(m);
|
tri::RequirePerTetraQuality(m);
|
||||||
ForEachTetra(m, [&q] (MeshType::TetraType & t) {
|
ForEachTetra(m, [&q] (TetraType & t) {
|
||||||
t.Q() = q;
|
t.Q() = q;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static void TetraFromVolume(MeshType & m)
|
static void TetraFromVolume(MeshType & m)
|
||||||
{
|
{
|
||||||
tri::RequirePerTetraQuality(m);
|
tri::RequirePerTetraQuality(m);
|
||||||
ForEachTetra(m, [] (MeshType::TetraType & t) {
|
ForEachTetra(m, [] (TetraType & t) {
|
||||||
t.Q() = TetraQualityType(vcg::Tetra::ComputeVolume(t));
|
t.Q() = TetraQualityType(vcg::Tetra::ComputeVolume(t));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +159,7 @@ static void TetraFromVolume(MeshType & m)
|
||||||
static void TetraFromAspectRatio(MeshType & m)
|
static void TetraFromAspectRatio(MeshType & m)
|
||||||
{
|
{
|
||||||
tri::RequirePerTetraQuality(m);
|
tri::RequirePerTetraQuality(m);
|
||||||
ForEachTetra(m, [] (MeshType::TetraType & t) {
|
ForEachTetra(m, [] (TetraType & t) {
|
||||||
t.Q() = TetraQualityType(vcg::Tetra::AspectRatio(t));
|
t.Q() = TetraQualityType(vcg::Tetra::AspectRatio(t));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ static size_t FaceAll(MeshType &m)
|
||||||
/// \brief This function select all the tetras.
|
/// \brief This function select all the tetras.
|
||||||
static size_t TetraAll (MeshType & m)
|
static size_t TetraAll (MeshType & m)
|
||||||
{
|
{
|
||||||
ForEachTetra(m, [] (MeshType::TetraType & t) {
|
ForEachTetra(m, [] (TetraType & t) {
|
||||||
t.SetS();
|
t.SetS();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -252,7 +252,7 @@ static size_t FaceClear(MeshType &m)
|
||||||
/// \brief This function clears the selection flag for all the tetras.
|
/// \brief This function clears the selection flag for all the tetras.
|
||||||
static size_t TetraClear (MeshType & m)
|
static size_t TetraClear (MeshType & m)
|
||||||
{
|
{
|
||||||
ForEachTetra(m, [] (MeshType::TetraType & t) {
|
ForEachTetra(m, [] (TetraType & t) {
|
||||||
t.ClearS();
|
t.ClearS();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -299,7 +299,7 @@ static size_t VertexCount(MeshType &m)
|
||||||
static size_t TetraCount (MeshType & m)
|
static size_t TetraCount (MeshType & m)
|
||||||
{
|
{
|
||||||
size_t selCnt = 0;
|
size_t selCnt = 0;
|
||||||
ForEachTetra(m, [&selCnt] (MeshType::TetraType & t) {
|
ForEachTetra(m, [&selCnt] (TetraType & t) {
|
||||||
if (t.IsS())
|
if (t.IsS())
|
||||||
++selCnt;
|
++selCnt;
|
||||||
});
|
});
|
||||||
|
|
@ -358,7 +358,7 @@ static size_t VertexInvert(MeshType &m)
|
||||||
static size_t TetraInvert (MeshType & m)
|
static size_t TetraInvert (MeshType & m)
|
||||||
{
|
{
|
||||||
size_t selCnt = 0;
|
size_t selCnt = 0;
|
||||||
ForEachTetra(m, [&selCnt] (MeshType::TetraType & t) {
|
ForEachTetra(m, [&selCnt] (TetraType & t) {
|
||||||
if (t.IsS())
|
if (t.IsS())
|
||||||
t.ClearS();
|
t.ClearS();
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ public:
|
||||||
|
|
||||||
static void FillFaceVector (MeshType & m, std::vector<PFace> & fvec)
|
static void FillFaceVector (MeshType & m, std::vector<PFace> & fvec)
|
||||||
{
|
{
|
||||||
ForEachTetra(m, [&fvec] (MeshType::TetraType & t) {
|
ForEachTetra(m, [&fvec] (TetraType & t) {
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
fvec.push_back(PFace(&t, i));
|
fvec.push_back(PFace(&t, i));
|
||||||
});
|
});
|
||||||
|
|
@ -320,7 +320,7 @@ static void AllocateEdge(MeshType &m)
|
||||||
static void ClearTetraTetra (MeshType & m)
|
static void ClearTetraTetra (MeshType & m)
|
||||||
{
|
{
|
||||||
RequireTTAdjacency(m);
|
RequireTTAdjacency(m);
|
||||||
ForEachTetra(m, [] (MeshType::TetraType & t) {
|
ForEachTetra(m, [] (TetraType & t) {
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
t.TTp(i) = NULL;
|
t.TTp(i) = NULL;
|
||||||
|
|
@ -437,12 +437,12 @@ static void VertexTetra(MeshType & m)
|
||||||
RequireVTAdjacency(m);
|
RequireVTAdjacency(m);
|
||||||
|
|
||||||
|
|
||||||
ForEachVertex(m, [] (MeshType::VertexType & v) {
|
ForEachVertex(m, [] (VertexType & v) {
|
||||||
v.VTp() = NULL;
|
v.VTp() = NULL;
|
||||||
v.VTi() = 0;
|
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
|
//this works like this: the first iteration defines the end of the chain
|
||||||
//then it backwards chains everything
|
//then it backwards chains everything
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue