mirror of https://github.com/CGAL/cgal
Fix function name
This commit is contained in:
parent
0f25ddae73
commit
9fbfd93b56
|
|
@ -343,7 +343,7 @@ void Polyhedron_demo_polylines_io_plugin::simplify()
|
|||
{
|
||||
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
|
||||
bool ok;
|
||||
double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->diagonalBbox(),2),0,999,8,&ok);
|
||||
double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->bboxDiagonal(),2),0,999,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
for(Scene_polylines_item::Polylines_container::iterator
|
||||
|
|
|
|||
|
|
@ -404,8 +404,8 @@ private Q_SLOTS:
|
|||
// compute centroid
|
||||
Point c = CGAL::centroid(triangles.begin(),triangles.end());
|
||||
|
||||
oliver_queen = new Scene_arrow_item(Vec(c.x(),c.y(),c.z()), fg_item->diagonalBbox() / 50.0f,
|
||||
fg_item->diagonalBbox()/3.0f);
|
||||
oliver_queen = new Scene_arrow_item(Vec(c.x(),c.y(),c.z()), fg_item->bboxDiagonal() / 50.0f,
|
||||
fg_item->bboxDiagonal()/3.0f);
|
||||
Vec dir(plane.orthogonal_vector().x(),
|
||||
plane.orthogonal_vector().y(),
|
||||
plane.orthogonal_vector().z());
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ void Polyhedron_demo_repair_polyhedron_plugin::on_actionRemoveNeedlesAndCaps_tri
|
|||
QDialog dialog;
|
||||
Ui::NeedleDialog ui;
|
||||
ui.setupUi(&dialog);
|
||||
ui.collapseBox->setValue(sm_item->diagonalBbox()*0.01);
|
||||
ui.collapseBox->setValue(sm_item->bboxDiagonal()*0.01);
|
||||
if(dialog.exec() != QDialog::Accepted)
|
||||
return;
|
||||
CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces(*sm_item->face_graph(),
|
||||
|
|
|
|||
|
|
@ -928,7 +928,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetectShapesSM_t
|
|||
dialog.m_cluster_epsilon_field->setEnabled(false);
|
||||
dialog.groupBox_3->setEnabled(false);
|
||||
//todo: check default values
|
||||
dialog.m_epsilon_field->setValue(0.01*sm_item->diagonalBbox());
|
||||
dialog.m_epsilon_field->setValue(0.01*sm_item->bboxDiagonal());
|
||||
std::size_t nb_faces = mesh->number_of_faces();
|
||||
dialog.m_min_pts_field->setValue((std::max)(static_cast<int>(0.01*nb_faces), 1));
|
||||
if(!dialog.exec()) return;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ CGAL::Three::Scene_item::Scene_item(int buffers_size, int vaos_size)
|
|||
|
||||
CGAL::QGLViewer::QGLViewerPool().first()->makeCurrent();
|
||||
is_bbox_computed = false;
|
||||
is_diag_bbox_computed = false;
|
||||
is_bbox_diag_computed = false;
|
||||
for(int i=0; i<vaosSize; i++)
|
||||
{
|
||||
addVaos(i);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct PRIV{
|
|||
PRIV(Scene_item_rendering_helper* item)
|
||||
: item(item),
|
||||
is_bbox_computed(false),
|
||||
is_diag_bbox_computed(false),
|
||||
is_bbox_diag_computed(false),
|
||||
_diag_bbox(0),
|
||||
alphaSlider(nullptr),
|
||||
are_buffers_filled(false)
|
||||
|
|
@ -44,7 +44,7 @@ struct PRIV{
|
|||
Scene_item_rendering_helper* item;
|
||||
Scene_item::Bbox _bbox;
|
||||
bool is_bbox_computed;
|
||||
bool is_diag_bbox_computed;
|
||||
bool is_bbox_diag_computed;
|
||||
double _diag_bbox;
|
||||
QSlider* alphaSlider;
|
||||
bool are_buffers_filled;
|
||||
|
|
@ -67,10 +67,10 @@ Scene_item_rendering_helper::~Scene_item_rendering_helper()
|
|||
delete priv;
|
||||
}
|
||||
|
||||
double Scene_item_rendering_helper::diagonalBbox() const {
|
||||
if(!priv->is_diag_bbox_computed)
|
||||
double Scene_item_rendering_helper::bboxDiagonal() const {
|
||||
if(!priv->is_bbox_diag_computed)
|
||||
priv->compute_diag_bbox();
|
||||
priv->is_diag_bbox_computed = true;
|
||||
priv->is_bbox_diag_computed = true;
|
||||
return priv->_diag_bbox;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ void Scene_points_with_normal_item_priv::compute_normals_and_vertices() const
|
|||
positions_selected_normals.resize(m_points->nb_selected_points() * 3);
|
||||
|
||||
// we can't afford computing real average spacing just for display, 0.5% of bbox will do
|
||||
average_spacing = 0.005 * item->diagonalBbox();
|
||||
average_spacing = 0.005 * item->bboxDiagonal();
|
||||
normal_length = (std::min)(average_spacing, std::sqrt(
|
||||
region_of_interest.squared_radius() / 1000.));
|
||||
length_factor = 10.0/100*normal_Slider->value();
|
||||
|
|
|
|||
|
|
@ -187,10 +187,10 @@ public:
|
|||
//! If the diagonal's length has never been computed, computes it and
|
||||
//! saves the result for further calls.
|
||||
//! @returns the item's bounding box's diagonal length.
|
||||
virtual double diagonalBbox() const {
|
||||
if(!is_diag_bbox_computed)
|
||||
virtual double bboxDiagonal() const {
|
||||
if(!is_bbox_diag_computed)
|
||||
compute_diag_bbox();
|
||||
is_diag_bbox_computed = true;
|
||||
is_bbox_diag_computed = true;
|
||||
return _diag_bbox;
|
||||
}
|
||||
|
||||
|
|
@ -413,7 +413,7 @@ protected:
|
|||
mutable Bbox _bbox;
|
||||
mutable double _diag_bbox;
|
||||
mutable bool is_bbox_computed;
|
||||
mutable bool is_diag_bbox_computed;
|
||||
mutable bool is_bbox_diag_computed;
|
||||
virtual void compute_bbox()const{}
|
||||
virtual void compute_diag_bbox()const;
|
||||
// The four basic properties
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ public:
|
|||
//! saves the result for further calls.
|
||||
//! @returns the item's bounding box's diagonal length.
|
||||
//! @todo must replace the one from Scene_item eventually
|
||||
virtual double diagonalBbox() const Q_DECL_OVERRIDE;
|
||||
virtual double bboxDiagonal() const Q_DECL_OVERRIDE;
|
||||
//!
|
||||
//! \brief newViewer adds Vaos for `viewer`.
|
||||
//! \param viewer the new viewer.
|
||||
|
|
|
|||
Loading…
Reference in New Issue