mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Fixed a bug where camera facing polygons were not textured
This commit is contained in:
@@ -889,7 +889,6 @@ bool ExportCloudsDialog::getExportedClouds(
|
||||
{
|
||||
mul+=1;
|
||||
}
|
||||
mul+=1; // normals
|
||||
if(_ui->checkBox_textureMapping->isChecked())
|
||||
{
|
||||
mul+=1;
|
||||
@@ -1720,7 +1719,7 @@ bool ExportCloudsDialog::getExportedClouds(
|
||||
|
||||
meshes.insert(std::make_pair(iter->first, mesh));
|
||||
|
||||
_progressDialog->incrementStep();
|
||||
_progressDialog->incrementStep(_ui->checkBox_assemble->isChecked()?poses.size():1);
|
||||
QApplication::processEvents();
|
||||
if(_canceled)
|
||||
{
|
||||
@@ -1877,6 +1876,7 @@ bool ExportCloudsDialog::getExportedClouds(
|
||||
}
|
||||
|
||||
TexturingState texturingState(_progressDialog);
|
||||
_progressDialog->setMaximumSteps(_progressDialog->maximumSteps()+iter->second->polygons.size()/10000+1);
|
||||
textureMesh = util3d::createTextureMesh(
|
||||
iter->second,
|
||||
cameraPoses,
|
||||
|
||||
@@ -133,14 +133,14 @@ void ProgressDialog::setMaximumSteps(int steps)
|
||||
_progressBar->setMaximum(steps);
|
||||
}
|
||||
|
||||
void ProgressDialog::incrementStep()
|
||||
void ProgressDialog::incrementStep(int steps)
|
||||
{
|
||||
//incremental progress bar (if we don't know how many items will be added)
|
||||
if(_progressBar->value() == _progressBar->maximum()-1)
|
||||
if(_progressBar->value() >= _progressBar->maximum()-steps)
|
||||
{
|
||||
_progressBar->setMaximum(_progressBar->maximum()+1);
|
||||
_progressBar->setMaximum(_progressBar->maximum()+steps+1);
|
||||
}
|
||||
_progressBar->setValue(_progressBar->value()+1);
|
||||
_progressBar->setValue(_progressBar->value()+steps);
|
||||
}
|
||||
|
||||
void ProgressDialog::clear()
|
||||
|
||||
@@ -50,6 +50,7 @@ public:
|
||||
if(!msg.empty())
|
||||
{
|
||||
dialog_->appendText(msg.c_str());
|
||||
dialog_->incrementStep();
|
||||
}
|
||||
QApplication::processEvents();
|
||||
return !canceled_;
|
||||
|
||||
Reference in New Issue
Block a user