Deal with Property_map

This commit is contained in:
Andreas Fabri 2022-01-18 18:47:42 +00:00
parent a0d794edc9
commit 2c2122f4f8
1 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,8 @@
#include <CGAL/Cartesian_converter.h>
#include <CGAL/property_map.h>
#include <cassert>
typedef CGAL::Simple_cartesian<double> K1;
typedef CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> > K2;
typedef K1::Point_3 Point_3;
@ -21,9 +23,9 @@ test()
VPMap vmap = get(CGAL::vertex_point, m);
CGAL::Cartesian_converter_property_map<K2::Point_3, VPMap> kcmap =CGAL::make_cartesian_converter_property_map<K2::Point_3>(vmap);
CGAL_assertion(get(kcmap, *vertices(m).begin()) == CGAL::Point_3<K2>(2,0,0));
assert(get(kcmap, *vertices(m).begin()) == CGAL::Point_3<K2>(2,0,0));
put(kcmap, *vertices(m).begin(), CGAL::Point_3<K2>(0,2,3));
CGAL_assertion(get(kcmap, *vertices(m).begin()) == CGAL::Point_3<K2>(0,2,3));
assert(get(kcmap, *vertices(m).begin()) == CGAL::Point_3<K2>(0,2,3));
}
@ -34,4 +36,3 @@ int main()
test<SM>();
return 0;
}