mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
other gcc naive warnings
This commit is contained in:
parent
1a61944ca0
commit
e27379959e
@ -1069,6 +1069,7 @@ void EditManipulatorsPlugin::Decorate(MeshModel &model, GLArea *gla, QPainter* /
|
||||
case EditManipulatorsPlugin::ManMove : HelpString1 = "<br> LEFT CLICK and DRAG to move"; break;
|
||||
case EditManipulatorsPlugin::ManRotate : HelpString1 = "<br> LEFT CLICK and DRAG to rotate"; break;
|
||||
case EditManipulatorsPlugin::ManScale : HelpString1 = "<br> LEFT CLICK and DRAG to scale"; break;
|
||||
case EditManipulatorsPlugin::ManNone : break;
|
||||
}
|
||||
|
||||
if((current_manip != EditManipulatorsPlugin::ManMove) || (current_manip_mode != EditManipulatorsPlugin::ModNone))
|
||||
|
||||
@ -89,7 +89,7 @@ void EditMeasurePlugin::Decorate(MeshModel & m, GLArea * gla,QPainter* p)
|
||||
this->Log(GLLogStream::FILTER, "Distance %s: %f", newM.ID.toStdString().c_str(), measuredDistance);
|
||||
}
|
||||
|
||||
for (int mind = 0; mind<measures.size(); mind++)
|
||||
for (size_t mind = 0; mind<measures.size(); mind++)
|
||||
{
|
||||
rubberband.RenderLine(gla, measures[mind].startP, measures[mind].endP);
|
||||
vcg::glLabel::render(p, measures[mind].endP, QString("%1: %2").arg(measures[mind].ID).arg(measures[mind].length));
|
||||
@ -99,7 +99,7 @@ void EditMeasurePlugin::Decorate(MeshModel & m, GLArea * gla,QPainter* p)
|
||||
instructions = "C to clear, P to print, S to save";
|
||||
|
||||
QString savedmeasure = "<br>";
|
||||
for (int mind = 0; mind<measures.size(); mind++)
|
||||
for (size_t mind = 0; mind<measures.size(); mind++)
|
||||
{
|
||||
savedmeasure.append(QString("%1 - %2<br>").arg(measures[mind].ID).arg(measures[mind].length));
|
||||
}
|
||||
@ -129,7 +129,7 @@ void EditMeasurePlugin::keyReleaseEvent(QKeyEvent *e, MeshModel &mod, GLArea *gl
|
||||
{
|
||||
this->Log(GLLogStream::FILTER, "------- Distances -------");
|
||||
this->Log(GLLogStream::FILTER, "ID: Dist [pointA][pointB]");
|
||||
for (int mind = 0; mind<measures.size(); mind++)
|
||||
for (size_t mind = 0; mind<measures.size(); mind++)
|
||||
{
|
||||
this->Log(GLLogStream::FILTER, "%s: %f [%f,%f,%f][%f,%f,%f]", measures[mind].ID.toStdString().c_str(), measures[mind].length,
|
||||
measures[mind].startP[0], measures[mind].startP[1], measures[mind].startP[2], measures[mind].endP[0], measures[mind].endP[1], measures[mind].endP[2]);
|
||||
@ -154,7 +154,7 @@ void EditMeasurePlugin::keyReleaseEvent(QKeyEvent *e, MeshModel &mod, GLArea *gl
|
||||
openFileTS << mod.shortName().toStdString().c_str() << "\n\n";
|
||||
|
||||
openFileTS << "ID : Dist [pointA][pointB]" << "\n";
|
||||
for (int mind = 0; mind<measures.size(); mind++)
|
||||
for (size_t mind = 0; mind<measures.size(); mind++)
|
||||
{
|
||||
openFileTS << measures[mind].ID.toStdString().c_str() << " : " << measures[mind].length << " [" <<
|
||||
measures[mind].startP[0] << ", " << measures[mind].startP[1] << ", " << measures[mind].startP[2] << "] [" <<
|
||||
|
||||
@ -20,9 +20,12 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
AlignSet::AlignSet(): mode(COMBINE),
|
||||
target(NULL), render(NULL),
|
||||
vbo(0), nbo(0), cbo(0), ibo(0), error(0){
|
||||
AlignSet::AlignSet():
|
||||
error(0),
|
||||
vbo(0), nbo(0), cbo(0), ibo(0),
|
||||
mode(COMBINE),
|
||||
target(NULL), render(NULL)
|
||||
{
|
||||
|
||||
box.SetNull();
|
||||
//correspList = new QList<PointCorrespondence*>();
|
||||
|
||||
@ -96,7 +96,6 @@ void EditMutualCorrsPlugin::Decorate(MeshModel &m, GLArea *gla, QPainter *p)
|
||||
// draw picked & reference points
|
||||
if(true)
|
||||
{
|
||||
int pindex;
|
||||
Point3m currpoint;
|
||||
Point2m currim;
|
||||
QString buf;
|
||||
@ -107,9 +106,9 @@ void EditMutualCorrsPlugin::Decorate(MeshModel &m, GLArea *gla, QPainter *p)
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
for(pindex=0; pindex<usePoint.size(); pindex++)
|
||||
for(size_t pindex=0; pindex<usePoint.size(); pindex++)
|
||||
{
|
||||
if(pindex == cindex) //if current
|
||||
if(pindex == (size_t)cindex) //if current
|
||||
glColor3ub(255, 255, 0);
|
||||
else if(usePoint[pindex]) //if active
|
||||
glColor3ub(150, 150, 0);
|
||||
@ -130,9 +129,9 @@ void EditMutualCorrsPlugin::Decorate(MeshModel &m, GLArea *gla, QPainter *p)
|
||||
vcg::glLabel::render(p,currpoint,buf);
|
||||
}
|
||||
|
||||
for (pindex = 0; pindex < usePoint.size(); pindex++)
|
||||
for (size_t pindex = 0; pindex < usePoint.size(); pindex++)
|
||||
{
|
||||
if (pindex == cindex) //if current
|
||||
if (pindex == (size_t)cindex) //if current
|
||||
glColor3ub(255, 255, 0);
|
||||
else if (usePoint[pindex]) //if active
|
||||
glColor3ub(150, 150, 0);
|
||||
@ -268,7 +267,6 @@ void EditMutualCorrsPlugin::EndEdit(MeshModel &/*m*/, GLArea * /*gla*/, MLSceneG
|
||||
void EditMutualCorrsPlugin::addNewPoint()
|
||||
{
|
||||
status_error = "";
|
||||
int pindex;
|
||||
bool alreadyThere;
|
||||
QString newname;
|
||||
|
||||
@ -284,7 +282,7 @@ void EditMutualCorrsPlugin::addNewPoint()
|
||||
{
|
||||
alreadyThere = false;
|
||||
newname = "PP" + QString::number(lastname++);
|
||||
for(pindex=0; pindex<pointID.size(); pindex++)
|
||||
for(size_t pindex=0; pindex<pointID.size(); pindex++)
|
||||
{
|
||||
if(pointID[pindex] == newname)
|
||||
alreadyThere=true;
|
||||
@ -456,7 +454,6 @@ void EditMutualCorrsPlugin::saveToFile() // export reference list + picked point
|
||||
{
|
||||
status_error = "";
|
||||
// saving
|
||||
int pindex;
|
||||
|
||||
QString openFileName = "";
|
||||
openFileName = QFileDialog::getSaveFileName(NULL, "Save Correspondences list", QDir::currentPath(), "Text file (*.txt)");
|
||||
@ -475,7 +472,7 @@ void EditMutualCorrsPlugin::saveToFile() // export reference list + picked point
|
||||
openFileTS << "Raster: " << glArea->md()->rm()->currentPlane->fullPathFileName << "\n";
|
||||
|
||||
// writing reference
|
||||
for(pindex=0; pindex<usePoint.size(); pindex++)
|
||||
for(size_t pindex=0; pindex<usePoint.size(); pindex++)
|
||||
{
|
||||
if(usePoint[pindex] == true)
|
||||
{
|
||||
@ -508,7 +505,7 @@ void EditMutualCorrsPlugin::applyMutual()
|
||||
|
||||
Correspondence corr;
|
||||
|
||||
for (int i = 0; i < imagePoints.size(); i++)
|
||||
for (size_t i = 0; i < imagePoints.size(); i++)
|
||||
{
|
||||
if (usePoint[i])
|
||||
{
|
||||
@ -610,7 +607,7 @@ void EditMutualCorrsPlugin::applyMutual()
|
||||
|
||||
if (solver.mIweight == 0.0)
|
||||
{
|
||||
for (int i = 0; i < align.correspList.size(); i++)
|
||||
for (size_t i = 0; i < align.correspList.size(); i++)
|
||||
{
|
||||
pointError[align.correspList[i].index] = align.correspList[i].error;
|
||||
}
|
||||
@ -652,7 +649,7 @@ void EditMutualCorrsPlugin::applyMutual()
|
||||
|
||||
|
||||
}
|
||||
for (int i = 0; i < align.correspList.size(); i++)
|
||||
for (size_t i = 0; i < align.correspList.size(); i++)
|
||||
{
|
||||
pointError[align.correspList[i].index] = align.correspList[i].error;
|
||||
}
|
||||
@ -742,4 +739,4 @@ bool EditMutualCorrsPlugin::initGL()
|
||||
|
||||
Log(0, "GL Initialization done");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,8 +38,7 @@ void edit_mutualcorrsDialog::updateTable()
|
||||
this->ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
this->ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
|
||||
int pindex =0;
|
||||
for(pindex=0; pindex < this->mutualcorrsPlugin->usePoint.size(); pindex++)
|
||||
for(size_t pindex=0; pindex < this->mutualcorrsPlugin->usePoint.size(); pindex++)
|
||||
{
|
||||
QTableWidgetItem* useIt = new QTableWidgetItem();
|
||||
if(this->mutualcorrsPlugin->usePoint[pindex])
|
||||
|
||||
@ -56,7 +56,7 @@ CREATE DATA SET
|
||||
Modify data,x, opts and info(?)
|
||||
*********************************************/
|
||||
//TOGLIERE SHOT DAI PARAMETRI!
|
||||
bool LevmarMethods::createDataSet(std::list<LevmarCorrelation>* corr,vcg::Shot<float>* s, LevmarData* data, double* x,double opts[LM_OPTS_SZ],double info[LM_INFO_SZ])
|
||||
bool LevmarMethods::createDataSet(std::list<LevmarCorrelation>* corr,vcg::Shot<float>* s, LevmarData* data, double* x,double opts[LM_OPTS_SZ],double /*info*/[LM_INFO_SZ])
|
||||
{
|
||||
bool my_ret_val=false;
|
||||
|
||||
@ -221,7 +221,7 @@ void LevmarMethods::estimateExtr(double *p, double *x, int /*m*/, int n, void *d
|
||||
}
|
||||
|
||||
//Estimate only the focal.
|
||||
void LevmarMethods::estimateFocal(double *p, double *x, int m, int n, void *data)
|
||||
void LevmarMethods::estimateFocal(double *p, double *x, int /*m*/, int n, void *data)
|
||||
{
|
||||
vcg::Point3f** ptr = ((LevmarData*) data)->points3d;
|
||||
vcg::Shot<float>* levmarCam = ((LevmarData*) data)->levmarCam;
|
||||
@ -236,4 +236,4 @@ void LevmarMethods::estimateFocal(double *p, double *x, int m, int n, void *data
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,9 +261,9 @@ void Parameters::scramble(double *_p, bool rescale) {
|
||||
fcenter[0] = 0; fcenter[1] = 0;
|
||||
fcenter = reference.ConvertCameraToWorldCoordinates(fcenter);
|
||||
|
||||
Point3f view = reference.Extrinsics.Tra();
|
||||
//view = center + (view - center)*ratio;
|
||||
Point3f diff = view - (center + (view - center)*ratio);
|
||||
// Point3f view = reference.Extrinsics.Tra();
|
||||
// view = center + (view - center)*ratio;
|
||||
// Point3f diff = view - (center + (view - center)*ratio);
|
||||
|
||||
_p[2] += ratio*dist;
|
||||
|
||||
|
||||
@ -430,7 +430,7 @@ double Solver::calculateError2( Shot &shot){
|
||||
std::vector<Correspondence> correspList = align->correspList;
|
||||
double error = 0;
|
||||
|
||||
for( int i=0; i<correspList.size(); i++){
|
||||
for( size_t i=0; i<correspList.size(); i++){
|
||||
Correspondence corr = correspList[i];
|
||||
vcg::Point2f projected = shot.Project(corr.Point3D);
|
||||
|
||||
@ -450,7 +450,7 @@ bool Solver::levmar(AlignSet *_align, Shot &shot){
|
||||
// QList<PointCorrespondence*> *correspList = align->correspList;
|
||||
|
||||
std::list<LevmarCorrelation> *corrs = new std::list<LevmarCorrelation>();
|
||||
for (int i = 0; i<align->correspList.size(); i++){
|
||||
for (size_t i = 0; i<align->correspList.size(); i++){
|
||||
//PointCorrespondence *corr = correspList->at(i);
|
||||
//PointOnLayer currentPointOnLayer1= corr->getPointAt(0);
|
||||
//PointOnLayer currentPointOnLayer2= corr->getPointAt(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user