14 template<
typename Po
intCloud,
typename VertexPropertyMap >
17 const VertexPropertyMap &pmap,
18 const std::string &property_map_name)
20 std::cout <<
"property map " << property_map_name <<
":" << std::endl;
24 auto vi = iterator_pair.first;
25 auto vi_end = iterator_pair.second;
26 for(; vi != vi_end; ++vi)
29 auto value =
get(pmap, *vi);
30 std::cout <<
" vertex #" << counter <<
": " << value << std::endl;
36 template<
typename Po
intCloudT >
43 std::cout <<
"Usage: " << argv[0]
44 <<
" input_mesh_filename output_mesh_filename" << std::endl;
45 std::cout <<
"Example: " << argv[0]
46 <<
" ../Testing/Data/tetra.xyz tetra.out.ply" << std::endl;
49 std::string input_file = argv[1];
50 std::string output_file = argv[2];
68 PointCloudT >::pmap_type;
72 std::cout <<
"use existing vertex-normal map" << std::endl;
78 std::cout <<
"create vertex-normal map" << std::endl;
85 typedef typename boost::property_traits< VertexNormalMap >::value_type Normal;
87 std::cout <<
"populate vertex-normal map" << std::endl;
90 auto vi = iterator_pair.first;
91 auto vi_end = iterator_pair.second;
92 for(; vi != vi_end; ++vi)
95 std::cout <<
" processing vertex #" << counter << std::endl;
98 Normal new_normal(42.1, 42.2, 42.3);
99 put(v_nm, *vi, new_normal);
106 PointCloudT >::pmap_type;
110 std::cout <<
"use existing vertex-color map" << std::endl;
116 std::cout <<
"create vertex-color map" << std::endl;
123 typedef typename boost::property_traits< VertexColorMap >::value_type Color;
127 std::cout <<
"populate vertex-color map" << std::endl;
130 vi = iterator_pair.first;
131 vi_end = iterator_pair.second;
132 for(; vi != vi_end; ++vi)
135 std::cout <<
" processing vertex #" << counter << std::endl;
138 Color newcolor(8, 2, 1);
139 put(v_cm, *vi, newcolor);
145 auto vertex_int_map = FEVV::make_vertex_property_map< PointCloudT, int >(pc);
146 auto vertex_color2_map =
147 FEVV::make_vertex_property_map< PointCloudT, Color >(pc);
150 std::cout <<
"populate vertex_int_map and vertex_color2_map (non-standard "
155 vi = iterator_pair.first;
156 vi_end = iterator_pair.second;
157 for(; vi != vi_end; ++vi)
160 std::cout <<
" processing vertex #" << counter << std::endl;
163 Color newcolor((counter*3) % 255 , (counter*3 + 1) % 255, (counter*3 + 2) % 255);
164 put(vertex_color2_map, *vi, newcolor);
166 put(vertex_int_map, *vi, 10 + counter);