Subdivision:methods_3: Use deprecation warning

This commit is contained in:
Andreas Fabri 2018-12-10 08:49:17 +01:00
parent 5b1e535cb9
commit 284e374df6
2 changed files with 19 additions and 4 deletions

View File

@ -11,7 +11,10 @@
#include "Scene_surface_mesh_item.h"
#include "SMesh_type.h"
#include <CGAL/subdivision_method_3.h>
using namespace CGAL::Three;
namespace params = CGAL::parameters;
class Polyhedron_demo_subdivision_methods_plugin :
public QObject,
public Polyhedron_demo_plugin_helper
@ -81,7 +84,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_loop(FaceGraphItem* item,
time.start();
messages->information("Loop subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::Loop_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::Loop_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -113,7 +116,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_catmullclark(FaceGraphIte
time.start();
messages->information("Catmull-Clark subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::CatmullClark_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::CatmullClark_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -143,7 +146,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_sqrt3(FaceGraphItem* item
time.start();
messages->information("Sqrt-3 subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::Sqrt3_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::Sqrt3_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();
@ -175,7 +178,7 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_doosabin(FaceGraphItem* i
time.start();
messages->information("Doo-Sabin subdivision...");
QApplication::setOverrideCursor(Qt::WaitCursor);
CGAL::Subdivision_method_3::DooSabin_subdivision(*graph, nb_steps);
CGAL::Subdivision_method_3::DooSabin_subdivision(*graph, params::number_of_iterations(nb_steps));
messages->information(QString("ok (%1 ms)").arg(time.elapsed()));
QApplication::restoreOverrideCursor();
item->invalidateOpenGLBuffers();

View File

@ -95,11 +95,14 @@ namespace parameters = CGAL::parameters;
#ifndef DOXYGEN_RUNNING
// Backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
CGAL_DEPRECATED_MSG("you are using the deprecated API of CatmullClark_subdivision(), please update your code")
void CatmullClark_subdivision(PolygonMesh& pmesh, int step = 1) {
PQQ(pmesh, CatmullClark_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)), step);
}
#endif
#endif
/*!
*
@ -142,11 +145,14 @@ void CatmullClark_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
CGAL_DEPRECATED_MSG("you are using the deprecated API of Loop_subdivision(), please update your code")
void Loop_subdivision(PolygonMesh& pmesh, int step = 1) {
PTQ(pmesh, Loop_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)) , step);
}
#endif
#endif
/*!
*
@ -187,11 +193,14 @@ void Loop_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
CGAL_DEPRECATED_MSG("you are using the deprecated API of DooSabin_subdivision(), please update your code")
void DooSabin_subdivision(PolygonMesh& pmesh, int step = 1) {
DQQ(pmesh, DooSabin_mask_3<PolygonMesh>(&pmesh, get(vertex_point, pmesh)), step);
}
#endif
#endif
/*!
*
@ -232,11 +241,14 @@ void DooSabin_subdivision(PolygonMesh& pmesh, const NamedParameters& np) {
#ifndef DOXYGEN_RUNNING
// backward compatibility
#ifndef CGAL_NO_DEPRECATED_CODE
template <class PolygonMesh>
CGAL_DEPRECATED_MSG("you are using the deprecated API of Sqrt3_subdivision(), please update your code")
void Sqrt3_subdivision(PolygonMesh& pmesh, int step = 1) {
Sqrt3(pmesh, Sqrt3_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)), step);
}
#endif
#endif
/*!
*