mirror of https://github.com/CGAL/cgal
Bugfix: percentage was not taken into account
This commit is contained in:
parent
b0af782dbb
commit
f974433669
|
|
@ -95,7 +95,7 @@ public:
|
||||||
srand(0); // for sake of repeatability
|
srand(0); // for sake of repeatability
|
||||||
m_ignore = 0;
|
m_ignore = 0;
|
||||||
m_init_done = false;
|
m_init_done = false;
|
||||||
m_percentage = 100.;
|
m_percentage = 1.;
|
||||||
m_bbox_x = 0.0;
|
m_bbox_x = 0.0;
|
||||||
m_bbox_y = 0.0;
|
m_bbox_y = 0.0;
|
||||||
m_bbox_size = 1.0;
|
m_bbox_size = 1.0;
|
||||||
|
|
@ -395,17 +395,18 @@ public:
|
||||||
|
|
||||||
void set_options(const int verbose, const int mchoice,
|
void set_options(const int verbose, const int mchoice,
|
||||||
const bool use_flip, const unsigned int relocation,
|
const bool use_flip, const unsigned int relocation,
|
||||||
const double ghost) {
|
const double ghost, const double percentage) {
|
||||||
|
|
||||||
m_pwsrec->set_verbose(verbose);
|
m_pwsrec->set_verbose(verbose);
|
||||||
m_pwsrec->set_random_sample_size(mchoice);
|
m_pwsrec->set_random_sample_size(mchoice);
|
||||||
m_pwsrec->set_use_flip(use_flip);
|
m_pwsrec->set_use_flip(use_flip);
|
||||||
m_pwsrec->set_relocation(relocation);
|
m_pwsrec->set_relocation(relocation);
|
||||||
m_pwsrec->set_relevance(ghost);
|
m_pwsrec->set_relevance(ghost);
|
||||||
|
m_percentage = percentage;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool init_reconstruction(const double percentage) {
|
bool init_reconstruction(const double percentage) {
|
||||||
std::cout << " init_reconstruction " << std::endl;
|
std::cout << " init_reconstruction with " << (unsigned int)(100.*percentage) << "% of points" << std::endl;
|
||||||
|
|
||||||
if (m_samples.empty()) {
|
if (m_samples.empty()) {
|
||||||
std::cerr << "initialization failed (empty point set)" << std::endl;
|
std::cerr << "initialization failed (empty point set)" << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,7 @@ void MainWindow::on_actionDecimate_triggered()
|
||||||
void MainWindow::set_scene_options()
|
void MainWindow::set_scene_options()
|
||||||
{
|
{
|
||||||
m_scene->set_options(m_verbose, m_mchoice, m_use_flip,
|
m_scene->set_options(m_verbose, m_mchoice, m_use_flip,
|
||||||
m_relocation, m_relevance);
|
m_relocation, m_relevance, percentage());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionReconstruction_reinit_triggered()
|
void MainWindow::on_actionReconstruction_reinit_triggered()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue