19 : QDialog(parent),
Ui::ComputeOctreeDialog(), m_bbEditorDlg(0) {
22 headerLabel->setText(QString(
"Max subdivision level: %1")
26 if (minCellSize > 0.0) {
27 cellSizeDoubleSpinBox->setMinimum(minCellSize);
28 cellSizeDoubleSpinBox->setMaximum(1.0e9);
31 "[ccComputeOctreeDlg] Invalid minimum cell size specified!");
32 cellSizeRadioButton->setEnabled(
false);
40 connect(customBBToolButton, &QAbstractButton::clicked,
m_bbEditorDlg,
44 "[ccComputeOctreeDlg] Invalid base bounding-box specified!");
45 customBBRadioButton->setEnabled(
false);
51 if (cellSizeRadioButton->isChecked())
53 else if (customBBRadioButton->isChecked())
56 assert(defaultRadioButton->isChecked());
61 return cellSizeDoubleSpinBox->value();
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Dialog to define the extents of a 3D box.
void forceKeepSquare(bool state)
Forces the 'keep square' mode.
const ccBBox & getBox() const
Returns bounding box.
void setBaseBBox(const ccBBox &box, bool isMinimal=true)
Sets the (minimal) base box.
ComputationMode getMode() const
Returns octree computation mode.
double getMinCellSize() const
Returns cell size at max level.
ccBBox getCustomBBox() const
Returns custom bbox.
ccComputeOctreeDlg(const ccBBox &baseBBox, double minCellSize, QWidget *parent=0)
Default constructor.
ccBoundingBoxEditorDlg * m_bbEditorDlg
Associated dialog.
ComputationMode
Computation mode.
bool isValid() const
Returns whether bounding box is valid or not.
static const int MAX_OCTREE_LEVEL
Max octree subdivision level.