ccGeomFeaturesDlg.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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: Daniel Girardeau-Montaut #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_GEOM_FEATURES_DIALOG_HEADER
  18. #define CC_GEOM_FEATURES_DIALOG_HEADER
  19. //Local
  20. #include "ccLibAlgorithms.h"
  21. //Qt
  22. #include <QDialog>
  23. #include <ui_geomFeaturesDlg.h>
  24. //! Dialog for computing the density of a point clouds
  25. class ccGeomFeaturesDlg: public QDialog, public Ui::GeomFeaturesDialog
  26. {
  27. public:
  28. //! Default constructor
  29. explicit ccGeomFeaturesDlg(QWidget* parent = nullptr);
  30. //! Sets selected features
  31. void setSelectedFeatures(const ccLibAlgorithms::GeomCharacteristicSet& features);
  32. //! Returns selected features
  33. bool getSelectedFeatures(ccLibAlgorithms::GeomCharacteristicSet& features) const;
  34. //! Sets the default kernel radius (for 'precise' mode only)
  35. void setRadius(double r);
  36. //! Returns the kernel radius (for 'precise' mode only)
  37. double getRadius() const;
  38. //! Sets the 'up direction' (and enables the group at the same time)
  39. void setUpDirection(const CCVector3& upDir);
  40. //! Returns the 'up direction' if any is defined (nullptr otherwise)
  41. CCVector3* getUpDirection() const;
  42. //! Reset the whole dialog
  43. void reset();
  44. protected:
  45. struct Option : ccLibAlgorithms::GeomCharacteristic
  46. {
  47. Option(QCheckBox* cb, CCCoreLib::GeometricalAnalysisTools::GeomCharacteristic c, int option = 0)
  48. : ccLibAlgorithms::GeomCharacteristic(c, option)
  49. , checkBox(cb)
  50. {}
  51. QCheckBox* checkBox = nullptr;
  52. };
  53. std::vector<Option> m_options;
  54. };
  55. #endif // CC_GEOM_FEATURES_DIALOG_HEADER