mirror of https://github.com/CGAL/cgal
Deal with Property_map
This commit is contained in:
parent
a0d794edc9
commit
2c2122f4f8
|
|
@ -6,6 +6,8 @@
|
||||||
#include <CGAL/Cartesian_converter.h>
|
#include <CGAL/Cartesian_converter.h>
|
||||||
#include <CGAL/property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
typedef CGAL::Simple_cartesian<double> K1;
|
typedef CGAL::Simple_cartesian<double> K1;
|
||||||
typedef CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> > K2;
|
typedef CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> > K2;
|
||||||
typedef K1::Point_3 Point_3;
|
typedef K1::Point_3 Point_3;
|
||||||
|
|
@ -21,9 +23,9 @@ test()
|
||||||
VPMap vmap = get(CGAL::vertex_point, m);
|
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::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));
|
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>();
|
test<SM>();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue