21 template<
typename HalfedgeGraph,
23 typename VertexColorMap,
24 typename VertexNormalMap,
30 VertexNormalMap &v_nm,
31 const GeometryTraits >)
33 typedef boost::graph_traits< HalfedgeGraph > GraphTraits;
34 typedef typename GraphTraits::vertex_iterator vertex_iterator;
36 typedef typename GraphTraits::face_iterator face_iterator;
37 typedef typename boost::property_traits< PointMap >::value_type
Point;
38 typedef typename boost::property_traits< VertexColorMap >::value_type Color;
39 typedef typename boost::property_traits< VertexNormalMap >::value_type Normal;
54 vertex_iterator vi = iterator_pair.first;
55 vertex_iterator vi_end = iterator_pair.second;
56 for(; vi != vi_end; ++vi)
59 std::cout <<
"processing vertex #" << counter << std::endl;
63 Color c =
get(v_cm, *vi);
64 Normal n =
get(v_nm, *vi);
67 Point newpoint(gt.get_x(p) + 1, gt.get_y(p) + 2, gt.get_z(p) + 1);
68 put(pm, *vi, newpoint);
69 Color newcolor(c[0]/2.0, c[1]/2.0, c[2]/2.0);
70 put(v_cm, *vi, newcolor);
71 Normal newnormal(n[0]/2.0, n[1]/2.0, n[2]/2.0);
72 put(v_nm, *vi, newnormal);
79 my_property_map = FEVV::make_face_property_map< HalfedgeGraph, float >(g);
83 auto face_iterator_pair =
faces(g);
84 face_iterator fi = face_iterator_pair.first;
85 face_iterator fi_end = face_iterator_pair.second;
86 for(; fi != fi_end; ++fi)
88 static float value = 42.1f;
89 put(my_property_map, *fi, value);
96 fi = face_iterator_pair.first;
97 for(; fi != fi_end; ++fi)
100 float value =
get(my_property_map, *fi);
101 std::cout <<
"my_property_map[face#" << counter <<
"] = " << value
107 template<
typename HalfedgeGraph,
109 typename VertexColorMap,
110 typename VertexNormalMap,
115 VertexColorMap &v_cm,
116 VertexNormalMap &v_nm)
119 GeometryTraits gt(g);