mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/releases/CGAL-4.11-branch'
This commit is contained in:
commit
2de42e8f92
|
|
@ -792,6 +792,7 @@ void MainWindow::message(QString message, QString colorName, QString font) {
|
|||
message.remove(message.length()-1, 1);
|
||||
}
|
||||
statusBar()->showMessage(message, 5000);
|
||||
QTimer::singleShot(5000, [this]{this->statusBar()->setStyleSheet("");});
|
||||
message = "<font color=\"" + colorName + "\" style=\"font-style: " + font + ";\" >" +
|
||||
message + "</font><br>";
|
||||
message = "[" + QTime::currentTime().toString() + "] " + message;
|
||||
|
|
@ -800,14 +801,17 @@ void MainWindow::message(QString message, QString colorName, QString font) {
|
|||
}
|
||||
|
||||
void MainWindow::information(QString text) {
|
||||
this->message("INFO: " + text, "");
|
||||
statusBar()->setStyleSheet("color: blue");
|
||||
this->message("INFO: " + text, "blue");
|
||||
}
|
||||
|
||||
void MainWindow::warning(QString text) {
|
||||
this->message("WARNING: " + text, "blue");
|
||||
statusBar()->setStyleSheet("color: orange");
|
||||
this->message("WARNING: " + text, "orange");
|
||||
}
|
||||
|
||||
void MainWindow::error(QString text) {
|
||||
statusBar()->setStyleSheet("color: red");
|
||||
this->message("ERROR: " + text, "red");
|
||||
}
|
||||
|
||||
|
|
@ -2027,3 +2031,4 @@ void MainWindow::set_facegraph_mode_adapter(bool is_polyhedron)
|
|||
else
|
||||
set_face_graph_default_type(SURFACE_MESH);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -349,7 +349,6 @@ protected Q_SLOTS:
|
|||
void on_actionRecenterScene_triggered();
|
||||
//!Resizes the header of the scene view
|
||||
void resetHeader();
|
||||
|
||||
protected:
|
||||
QList<QAction*> createSubMenus(QList<QAction*>);
|
||||
/*! For each objects in the Geometric Objects view, loads the associated plugins.
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ void Scene_points_with_normal_item_priv::initializeBuffers(CGAL::Three::Viewer_i
|
|||
program->setAttributeBuffer("colors",CGAL_GL_data_type,0,3);
|
||||
item->buffers[Points_colors].release();
|
||||
}
|
||||
else
|
||||
program->disableAttributeArray("colors");
|
||||
|
||||
item->vaos[Edges]->release();
|
||||
|
||||
|
|
@ -263,12 +265,15 @@ void Scene_points_with_normal_item_priv::initializeBuffers(CGAL::Three::Viewer_i
|
|||
colors_points.resize(0);
|
||||
std::vector<CGAL_data_type>(colors_points).swap(colors_points);
|
||||
}
|
||||
|
||||
else
|
||||
program->disableAttributeArray("colors");
|
||||
item->vaos[ThePoints]->release();
|
||||
program->release();
|
||||
|
||||
if(item->has_normals())
|
||||
{
|
||||
program = item->getShaderProgram(Scene_points_with_normal_item::PROGRAM_WITH_LIGHT, viewer);
|
||||
program->bind();
|
||||
item->vaos[TheShadedPoints]->bind();
|
||||
item->buffers[Edges_vertices].bind();
|
||||
program->enableAttributeArray("vertex");
|
||||
|
|
@ -316,11 +321,13 @@ void Scene_points_with_normal_item_priv::initializeBuffers(CGAL::Three::Viewer_i
|
|||
static_cast<int>(6*sizeof(CGAL_GL_data_type)));
|
||||
}
|
||||
item->buffers[Edges_vertices].release();
|
||||
program->disableAttributeArray("colors");
|
||||
item->vaos[Selected_points]->release();
|
||||
program->release();
|
||||
if(item->has_normals())
|
||||
{
|
||||
program = item->getShaderProgram(Scene_points_with_normal_item::PROGRAM_WITH_LIGHT, viewer);
|
||||
program->bind();
|
||||
item->vaos[Selected_shaded_points]->bind();
|
||||
item->buffers[Edges_vertices].bind();
|
||||
program->enableAttributeArray("vertex");
|
||||
|
|
@ -330,7 +337,7 @@ void Scene_points_with_normal_item_priv::initializeBuffers(CGAL::Three::Viewer_i
|
|||
static_cast<int>(6*sizeof(CGAL_GL_data_type)));
|
||||
|
||||
item->buffers[Edges_vertices].release();
|
||||
|
||||
program->disableAttributeArray("colors");
|
||||
item->buffers[Selected_points_normals].bind();
|
||||
item->buffers[Selected_points_normals].allocate(positions_selected_normals.data(),
|
||||
static_cast<int>(positions_selected_normals.size()*sizeof(CGAL_data_type)));
|
||||
|
|
@ -750,8 +757,8 @@ void Scene_points_with_normal_item::drawPoints(CGAL::Three::Viewer_interface* vi
|
|||
viewer->glPointSize(d->point_Slider->value());
|
||||
double ratio_displayed = 1.0;
|
||||
if ((viewer->inFastDrawing () || d->isPointSliderMoving())
|
||||
&&((d->nb_points + d->nb_selected_points)/3 > limit_fast_drawing)) // arbitrary large value
|
||||
ratio_displayed = 3 * limit_fast_drawing / (double)(d->nb_points + d->nb_selected_points);
|
||||
&&((d->nb_points )/3 > limit_fast_drawing)) // arbitrary large value
|
||||
ratio_displayed = 3 * limit_fast_drawing / (double)(d->nb_points);
|
||||
|
||||
// POINTS
|
||||
if(has_normals() && renderingMode() == ShadedPoints)
|
||||
|
|
@ -770,7 +777,7 @@ void Scene_points_with_normal_item::drawPoints(CGAL::Three::Viewer_interface* vi
|
|||
if (!(d->m_points->has_colors()) || renderingMode() == ShadedPoints)
|
||||
d->program->setAttributeValue("colors", this->color());
|
||||
viewer->glDrawArrays(GL_POINTS, 0,
|
||||
static_cast<GLsizei>(((std::size_t)(ratio_displayed * d->nb_points)/3)));
|
||||
static_cast<GLsizei>(((std::size_t)(ratio_displayed * (d->nb_points - d->nb_selected_points))/3)));
|
||||
|
||||
if(has_normals() && renderingMode() == ShadedPoints)
|
||||
vaos[Scene_points_with_normal_item_priv::TheShadedPoints]->release();
|
||||
|
|
@ -778,9 +785,7 @@ void Scene_points_with_normal_item::drawPoints(CGAL::Three::Viewer_interface* vi
|
|||
vaos[Scene_points_with_normal_item_priv::ThePoints]->release();
|
||||
d->program->release();
|
||||
|
||||
|
||||
// SELECTED POINTS
|
||||
vaos[Scene_points_with_normal_item_priv::Selected_points]->bind();
|
||||
if(has_normals() && renderingMode() == ShadedPoints)
|
||||
{
|
||||
vaos[Scene_points_with_normal_item_priv::Selected_shaded_points]->bind();
|
||||
|
|
@ -794,12 +799,12 @@ void Scene_points_with_normal_item::drawPoints(CGAL::Three::Viewer_interface* vi
|
|||
attribBuffers(viewer,PROGRAM_NO_SELECTION);
|
||||
}
|
||||
d->program->bind();
|
||||
d->program->setAttributeValue("colors", QColor(255,0,0));
|
||||
d->program->setAttributeValue("colors", QColor(Qt::red));
|
||||
viewer->glDrawArrays(GL_POINTS, 0,
|
||||
static_cast<GLsizei>(((std::size_t)(ratio_displayed * d->nb_selected_points)/3)));
|
||||
|
||||
if(has_normals() && renderingMode() == ShadedPoints)
|
||||
vaos[Scene_points_with_normal_item_priv::Selected_shaded_points]->bind();
|
||||
vaos[Scene_points_with_normal_item_priv::Selected_shaded_points]->release();
|
||||
else
|
||||
vaos[Scene_points_with_normal_item_priv::Selected_points]->release();
|
||||
d->program->release();
|
||||
|
|
@ -885,7 +890,7 @@ QMenu* Scene_points_with_normal_item::contextMenu()
|
|||
{
|
||||
QMenu *container = new QMenu(tr("Normals Length"));
|
||||
QWidgetAction *sliderAction = new QWidgetAction(0);
|
||||
if((d->nb_points + d->nb_selected_points)/3 <= limit_fast_drawing)
|
||||
if((d->nb_points)/3 <= limit_fast_drawing)
|
||||
{
|
||||
connect(d->normal_Slider, &QSlider::valueChanged, this, &Scene_points_with_normal_item::invalidateOpenGLBuffers);
|
||||
connect(d->normal_Slider, &QSlider::valueChanged, this, &Scene_points_with_normal_item::itemChanged);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
template<class AK>
|
||||
void test_get_arithmetic_kernel(){
|
||||
typedef typename AK::Integer Integer;
|
||||
CGAL_assertion_code(typedef typename AK::Integer Integer);
|
||||
{
|
||||
CGAL_assertion_code(typedef CGAL::Polynomial<Integer> POLY;)
|
||||
CGAL_assertion_code(typedef typename CGAL::Get_arithmetic_kernel<POLY>::Arithmetic_kernel AK_;)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ Hilbert mapping
|
|||
|
||||
Now given a set of 2D points, they can be sorted in the order they have on such
|
||||
a space filling curve. Note that at each step, we split a square exactly at its center; we call this
|
||||
subdivision policy: \f$middle\f$ policy (see \cgalFigureRef{Spatial_sorting_fig_Hilbert_median}).
|
||||
subdivision policy: <i>middle</i> policy (see \cgalFigureRef{Spatial_sorting_fig_Hilbert_middle}).
|
||||
|
||||
\cgalFigureBegin{Spatial_sorting_fig_Hilbert_middle,Hilbert-middle.png}
|
||||
Hilbert sort with middle policy
|
||||
|
|
@ -75,7 +75,7 @@ as above, we subdivide it
|
|||
by splitting at the median point (in \f$ x\f$ or \f$ y\f$ directions alternating),
|
||||
we construct a 2-d tree adapted to the point set. This tree can be visited in a
|
||||
similar manner and we get also a suitable ordering of the points; we call this
|
||||
subdivision policy: \f$median\f$ policy (see \cgalFigureRef{Spatial_sorting_fig_Hilbert_median}).
|
||||
subdivision policy: <i>median</i> policy (see \cgalFigureRef{Spatial_sorting_fig_Hilbert_median}).
|
||||
|
||||
\cgalFigureBegin{Spatial_sorting_fig_Hilbert_median,Hilbert-median.png}
|
||||
Hilbert sort with median policy
|
||||
|
|
|
|||
Loading…
Reference in New Issue