Deal with Triangulation_3

This commit is contained in:
Andreas Fabri 2022-01-18 16:47:56 +00:00
parent 2abcabafc5
commit 4400f00a69
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@
#include <CGAL/boost/iterator/transform_iterator.hpp> #include <CGAL/boost/iterator/transform_iterator.hpp>
#include <vector> #include <vector>
#include <cassert>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb; typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
@ -37,7 +38,7 @@ int main()
Triangulation T( boost::make_transform_iterator(points.begin(),Auto_count()), Triangulation T( boost::make_transform_iterator(points.begin(),Auto_count()),
boost::make_transform_iterator(points.end(), Auto_count() ) ); boost::make_transform_iterator(points.end(), Auto_count() ) );
CGAL_assertion( T.number_of_vertices() == 6 ); assert( T.number_of_vertices() == 6 );
// check that the info was correctly set. // check that the info was correctly set.
Triangulation::Finite_vertices_iterator vit; Triangulation::Finite_vertices_iterator vit;

View File

@ -7,6 +7,7 @@
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <cassert>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb; typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
@ -36,7 +37,7 @@ int main()
Triangulation T(boost::make_zip_iterator(boost::make_tuple( points.begin(),indices.begin() )), Triangulation T(boost::make_zip_iterator(boost::make_tuple( points.begin(),indices.begin() )),
boost::make_zip_iterator(boost::make_tuple( points.end(),indices.end() ) ) ); boost::make_zip_iterator(boost::make_tuple( points.end(),indices.end() ) ) );
CGAL_assertion( T.number_of_vertices() == 6 ); assert( T.number_of_vertices() == 6 );
// check that the info was correctly set. // check that the info was correctly set.
Triangulation::Finite_vertices_iterator vit; Triangulation::Finite_vertices_iterator vit;