ccPtsSamplingDlg.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  4. //# #
  5. //# This program is free software; you can redistribute it and/or modify #
  6. //# it under the terms of the GNU General Public License as published by #
  7. //# the Free Software Foundation; version 2 or later of the License. #
  8. //# #
  9. //# This program is distributed in the hope that it will be useful, #
  10. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  11. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  12. //# GNU General Public License for more details. #
  13. //# #
  14. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #include "ccPtsSamplingDlg.h"
  18. ccPtsSamplingDlg::ccPtsSamplingDlg(QWidget* parent/*=nullptr*/)
  19. : QDialog(parent, Qt::Tool)
  20. , Ui::PointsSamplingDialog()
  21. {
  22. setupUi(this);
  23. }
  24. bool ccPtsSamplingDlg::generateNormals() const
  25. {
  26. return normalsCheckBox->isChecked();
  27. }
  28. void ccPtsSamplingDlg::setGenerateNormals(bool state)
  29. {
  30. normalsCheckBox->setChecked(state);
  31. }
  32. bool ccPtsSamplingDlg::interpolateRGB() const
  33. {
  34. return colorsCheckBox->isChecked();
  35. }
  36. bool ccPtsSamplingDlg::interpolateTexture() const
  37. {
  38. return textureCheckBox->isChecked();
  39. }
  40. bool ccPtsSamplingDlg::useDensity() const
  41. {
  42. return dRadioButton->isChecked();
  43. }
  44. void ccPtsSamplingDlg::setUseDensity(bool state)
  45. {
  46. dRadioButton->setChecked(state);
  47. }
  48. double ccPtsSamplingDlg::getDensityValue() const
  49. {
  50. return dDoubleSpinBox->value();
  51. }
  52. void ccPtsSamplingDlg::setDensityValue(double density)
  53. {
  54. dDoubleSpinBox->setValue(density);
  55. }
  56. unsigned ccPtsSamplingDlg::getPointsNumber() const
  57. {
  58. return pnSpinBox->value();
  59. }
  60. void ccPtsSamplingDlg::setPointsNumber(int count)
  61. {
  62. pnSpinBox->setValue(count);
  63. }