diff --git a/vcg/space/point_matching.h b/vcg/space/point_matching.h index 05c599b6..7df6a116 100644 --- a/vcg/space/point_matching.h +++ b/vcg/space/point_matching.h @@ -50,26 +50,26 @@ void ComputeCrossCovarianceMatrix(const std::vector > &spVec, Point3 > &tpVec, Point3 &tpBarycenter, Eigen::Matrix3d &m) { - assert(spVec.size()==tpVec.size()); - m.setZero(); - spBarycenter.SetZero(); - tpBarycenter.SetZero(); - Eigen::Vector3d spe; - Eigen::Vector3d tpe; - typename std::vector >::const_iterator si,ti; - for(si=spVec.begin(),ti=tpVec.begin();si!=spVec.end();++si,++ti){ - spBarycenter+=*si; - tpBarycenter+=*ti; - si->ToEigenVector(spe); - ti->ToEigenVector(tpe); - m+=spe*tpe.transpose(); - } - spBarycenter/=spVec.size(); - tpBarycenter/=tpVec.size(); - spBarycenter.ToEigenVector(spe); - tpBarycenter.ToEigenVector(tpe); - m/=spVec.size(); - m-=spe*tpe.transpose(); + assert(spVec.size() == tpVec.size()); + m.setZero(); + spBarycenter.SetZero(); + tpBarycenter.SetZero(); + Eigen::Vector3d spe; + Eigen::Vector3d tpe; + typename std::vector >::const_iterator si, ti; + for (si = spVec.begin(), ti = tpVec.begin(); si != spVec.end(); ++si, ++ti){ + spBarycenter += *si; + tpBarycenter += *ti; + si->ToEigenVector(spe); + ti->ToEigenVector(tpe); + m += spe*tpe.transpose(); + } + spBarycenter /= double(spVec.size()); + tpBarycenter /= double(tpVec.size()); + spBarycenter.ToEigenVector(spe); + tpBarycenter.ToEigenVector(tpe); + m /= double(spVec.size()); + m -= spe*tpe.transpose(); } /*! \brief Compute the roto-translation that applied to PMov bring them onto Pfix diff --git a/wrap/dae/colladaformat.h b/wrap/dae/colladaformat.h index 72f137d3..29b6dfe7 100644 --- a/wrap/dae/colladaformat.h +++ b/wrap/dae/colladaformat.h @@ -760,7 +760,7 @@ namespace Tags class BindVertexInputTag : public XMLTag { public: - BindVertexInputTag(const QString& semantic,const QString& input_semantic,const QString& input_set) + BindVertexInputTag(const QString& semantic,const QString& input_semantic,const QString& /*input_set*/) :XMLTag("bind_vertex_input") { _attributes.push_back(TagAttribute("semantic",semantic)); diff --git a/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h b/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h index e434e086..547273b6 100644 --- a/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h +++ b/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h @@ -1509,7 +1509,7 @@ namespace vcg { //qDebug("Indexed drawing"); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _bo[INT_ATT_NAMES::ATT_VERTINDICES]->_bohandle); - glDrawElements(GL_TRIANGLES, _mesh.FN() * _bo[INT_ATT_NAMES::ATT_VERTINDICES]->_components, GL_UNSIGNED_INT, NULL); + glDrawElements(GL_TRIANGLES, GLsizei(_mesh.FN() * _bo[INT_ATT_NAMES::ATT_VERTINDICES]->_components), GL_UNSIGNED_INT, NULL); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } @@ -1819,7 +1819,7 @@ namespace vcg //qDebug("Indexed drawing"); updateClientState(req); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _bo[INT_ATT_NAMES::ATT_EDGEINDICES]->_bohandle); - glDrawElements(GL_LINES, _edge.size() * _bo[INT_ATT_NAMES::ATT_EDGEINDICES]->_components, GL_UNSIGNED_INT, NULL); + glDrawElements(GL_LINES, GLsizei(_edge.size() * _bo[INT_ATT_NAMES::ATT_EDGEINDICES]->_components), GL_UNSIGNED_INT, NULL); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); InternalRendAtts tmp; updateClientState(tmp); @@ -2235,8 +2235,8 @@ namespace vcg assert(nz >= 0); assert(nz < 2); - _v[0] = size_t(vcg::tri::Index(m, pe->V(nz)));; - _v[1] = size_t(vcg::tri::Index(m, pe->V((nz + 1) % 2))); + _v[0] = GLuint(vcg::tri::Index(m, pe->V(nz)));; + _v[1] = GLuint(vcg::tri::Index(m, pe->V((nz + 1) % 2))); assert(_v[0] != _v[1]); // The face pointed by 'f' is Degenerate (two coincident vertexes) if (_v[0] > _v[1]) diff --git a/wrap/gui/rubberband.cpp b/wrap/gui/rubberband.cpp index f08d0002..57d81632 100644 --- a/wrap/gui/rubberband.cpp +++ b/wrap/gui/rubberband.cpp @@ -139,7 +139,7 @@ void Rubberband::Render(QGLWidget* gla) assert(!glGetError()); } -void Rubberband::RenderLine(QGLWidget* gla, Point3f AA, Point3f BB) +void Rubberband::RenderLine(QGLWidget* /*gla*/, Point3f AA, Point3f BB) { // Drawing of the line from AA to BB glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT | GL_LINE_BIT | GL_POINT_BIT | GL_CURRENT_BIT | GL_LIGHTING_BIT | GL_COLOR_BUFFER_BIT); diff --git a/wrap/io_trimesh/export_3ds.h b/wrap/io_trimesh/export_3ds.h index 9a473b75..69e4bd15 100644 --- a/wrap/io_trimesh/export_3ds.h +++ b/wrap/io_trimesh/export_3ds.h @@ -234,7 +234,7 @@ namespace io { if(AddDuplexVertexCoord(ListOfDuplexVert,Key(i,t))) { VectorOfVertexType.push_back((*(*fi).V(k))); - ListOfDuplexVert[Key(i,t)] = VectorOfVertexType.size()-1; + ListOfDuplexVert[Key(i,t)] = int(VectorOfVertexType.size()-1); count++; } } diff --git a/wrap/io_trimesh/io_ply.h b/wrap/io_trimesh/io_ply.h index b376ee86..bd5aafcf 100644 --- a/wrap/io_trimesh/io_ply.h +++ b/wrap/io_trimesh/io_ply.h @@ -76,7 +76,7 @@ public: elemDescVec[elemType]->push_back(PropDescriptor()); elemNameVec[elemType]->push_back(attrName); elemDescVec[elemType]->back().elemname=elemStr[elemType]; - elemDescVec[elemType]->back().propname=strdup(propName); + elemDescVec[elemType]->back().propname=_strdup(propName); elemDescVec[elemType]->back().stotype1 = vcg::ply::T_FLOAT; elemDescVec[elemType]->back().memtype1 = vcg::ply::T_FLOAT; }