Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmespadero committed Nov 11, 2021
1 parent 179b936 commit 5aa7732
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,14 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType,
double QuadErr = qsum.Apply(vv);

//// Rescan faces and compute quality and difference between normals
int i;

double qt, MinQual = 1e100;
vcg::face::VFIterator<FaceType> x(this->pos.V(0));

double ndiff,MinCos = 1e100; // minimo coseno di variazione di una normale della faccia
// (e.g. max angle) Mincos varia da 1 (normali coincidenti) a
// -1 (normali opposte);

for(x.F() = v[0]->VFp(), x.I() = v[0]->VFi(),i=0; x.F()!=0; ++x ) // for all faces in v0
for(x.F() = v[0]->VFp(), x.I() = v[0]->VFi(); x.F()!=0; ++x ) // for all faces in v0
if(x.F()->V(0)!=v[1] && x.F()->V(1)!=v[1] && x.F()->V(2)!=v[1] ) // skip faces with v1
{
qt= QualityFace(*x.F());
Expand All @@ -347,7 +345,7 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType,
assert(!math::IsNAN(ndiff));
}
}
for(x.F() = v[1]->VFp(), x.I() = v[1]->VFi(),i=0; x.F()!=0; ++x ) // for all faces in v1
for(x.F() = v[1]->VFp(), x.I() = v[1]->VFi(); x.F()!=0; ++x ) // for all faces in v1
if(x.F()->V(0)!=v[0] && x.F()->V(1)!=v[0] && x.F()->V(2)!=v[0] ) // skip faces with v0
{
qt= QualityFace(*x.F());
Expand Down Expand Up @@ -703,7 +701,7 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType,
v[0] = this->pos.V(0);
v[1] = this->pos.V(1);

math::Quadric<double> qsum3 = QH::Qd3(v[0]);
vcg::math::Quadric<double> qsum3 = QH::Qd3(v[0]);
qsum3 += QH::Qd3(v[1]);

ncoords = GetTexCoords(tcoord0_1,tcoord1_1,tcoord0_2,tcoord1_2);
Expand Down
1 change: 1 addition & 0 deletions wrap/io_trimesh/import_off.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ namespace vcg {
nVertices = atoi(tokens[0].c_str());
nFaces = atoi(tokens[1].c_str());
nEdges = atoi(tokens[2].c_str());
(void)nEdges;

// dimension is the space dimension of vertices => it must be three(!)
if (dimension != 3)
Expand Down
7 changes: 2 additions & 5 deletions wrap/io_trimesh/import_vmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,19 +725,16 @@ namespace io {
/* resize the vector of vertices */
m.vert.resize(vertSize);


size_t read = 0;
/* load the vertices */
if(vertSize>0){
read=Read((void*)& m.vert[0],sizeof(VertexType),vertSize );
Read((void*)& m.vert[0],sizeof(VertexType),vertSize );
LoadVertexOcf<OpenMeshType,VertContainer>(F(),m.vert);
}

read = 0;
m.face.resize(faceSize);
if(faceSize>0){
/* load the faces */
read = Read((void*)& m.face[0],sizeof(FaceType),faceSize );
Read((void*)& m.face[0],sizeof(FaceType),faceSize );
LoadFaceOcf<OpenMeshType,FaceContainer>(m.face);
}

Expand Down

0 comments on commit 5aa7732

Please sign in to comment.