Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warnings #183

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions vcg/complex/algorithms/edge_collapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ class EdgeCollapser
// - we prepend that face to the list of the faces incident on v[1]
for(auto i=es.AV0().begin();i!=es.AV0().end();++i)
{
FaceType & f = *((*i).f);

//FaceType & f = *((*i).f);
if (preserveFaceEdgeS)
{
for (size_t j = 0; j < v2s.size(); ++j)
Expand Down Expand Up @@ -302,7 +301,7 @@ class EdgeCollapser
{
for (auto i = es1.AV0().begin(); i != es1.AV0().end(); ++i)
{
FaceType & f = *((*i).f);
//FaceType & f = *((*i).f);
for (size_t j = 0; j < fan1V2S.size(); ++j)
{
if ((*i).f->V(((*i).z+1)%3) == fan1V2S[j])
Expand Down
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
2 changes: 1 addition & 1 deletion wrap/io_trimesh/import_off.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ namespace vcg {
nVertices = atoi(tokens[0].c_str());
nFaces = atoi(tokens[1].c_str());
nEdges = atoi(tokens[2].c_str());
(void)nEdges; // unused
(void)nEdges; // Avoid unused warning

// 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);
}
(void)read; // unused
Expand Down