mirror of https://github.com/CGAL/cgal
using named parameters as documented
This commit is contained in:
parent
c89abd7d72
commit
25491714ba
|
|
@ -16,6 +16,7 @@ typedef CGAL::Surface_mesh<Kernel::Point_3> PolygonMesh;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace CGAL;
|
using namespace CGAL;
|
||||||
|
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
if (argc > 4) {
|
if (argc > 4) {
|
||||||
|
|
@ -40,7 +41,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
Timer t;
|
Timer t;
|
||||||
t.start();
|
t.start();
|
||||||
Subdivision_method_3::CatmullClark_subdivision(pmesh, d);
|
Subdivision_method_3::CatmullClark_subdivision(pmesh, params::number_of_iterations(d));
|
||||||
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
||||||
|
|
||||||
std::ofstream out(out_file);
|
std::ofstream out(out_file);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ typedef CGAL::Simple_cartesian<double> Kernel;
|
||||||
typedef CGAL::Surface_mesh<Kernel::Point_3> PolygonMesh;
|
typedef CGAL::Surface_mesh<Kernel::Point_3> PolygonMesh;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace CGAL;
|
using namespace CGAL;
|
||||||
|
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
||||||
|
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
template <class Poly>
|
template <class Poly>
|
||||||
|
|
@ -109,7 +110,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
Timer t;
|
Timer t;
|
||||||
t.start();
|
t.start();
|
||||||
Subdivision_method_3::PTQ(pmesh, WLoop_mask_3<PolygonMesh>(pmesh), d);
|
Subdivision_method_3::PTQ(pmesh, WLoop_mask_3<PolygonMesh>(pmesh), params::number_of_iterations(d));
|
||||||
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
||||||
|
|
||||||
std::ofstream out(out_file);
|
std::ofstream out(out_file);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ typedef CGAL::Polyhedron_3<Kernel> PolygonMesh;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace CGAL;
|
using namespace CGAL;
|
||||||
|
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
if (argc > 4) {
|
if (argc > 4) {
|
||||||
|
|
@ -42,7 +43,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
Timer t;
|
Timer t;
|
||||||
t.start();
|
t.start();
|
||||||
Subdivision_method_3::DooSabin_subdivision(pmesh, d);
|
Subdivision_method_3::DooSabin_subdivision(pmesh, params::number_of_iterations(d));
|
||||||
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
||||||
|
|
||||||
std::ofstream out(out_file);
|
std::ofstream out(out_file);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ typedef CGAL::Surface_mesh<Kernel::Point_3> PolygonMesh;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace CGAL;
|
using namespace CGAL;
|
||||||
|
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
if (argc > 4) {
|
if (argc > 4) {
|
||||||
|
|
@ -40,7 +41,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
Timer t;
|
Timer t;
|
||||||
t.start();
|
t.start();
|
||||||
Subdivision_method_3::Loop_subdivision(pmesh,d);
|
Subdivision_method_3::Loop_subdivision(pmesh, params::number_of_iterations(d));
|
||||||
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
||||||
|
|
||||||
std::ofstream out(out_file);
|
std::ofstream out(out_file);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ typedef CGAL::Surface_mesh<Kernel::Point_3> PolygonMesh;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace CGAL;
|
using namespace CGAL;
|
||||||
|
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
if (argc > 4) {
|
if (argc > 4) {
|
||||||
|
|
@ -40,7 +41,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
Timer t;
|
Timer t;
|
||||||
t.start();
|
t.start();
|
||||||
Subdivision_method_3::Sqrt3_subdivision(pmesh,d);
|
Subdivision_method_3::Sqrt3_subdivision(pmesh, params::number_of_iterations(d));
|
||||||
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
std::cerr << "Done (" << t.time() << " s)" << std::endl;
|
||||||
|
|
||||||
std::ofstream out(out_file);
|
std::ofstream out(out_file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue