MEPP2 Project
apply_color.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2022 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 
12 #pragma once
13 
14 #include <boost/graph/graph_traits.hpp>
15 #include <boost/graph/properties.hpp>
16 #include <CGAL/boost/graph/Euler_operations.h>
19 
20 #include <vector>
21 
22 namespace FEVV {
23 namespace Filters {
29 template<
30  typename HalfedgeGraph,
31  typename PointMap,
32  typename EdgeColorMap,
33  typename edge_descriptor =
34  typename boost::graph_traits< HalfedgeGraph >::edge_descriptor >
35 void
36 color_edge(HalfedgeGraph &/*g*/,PointMap &/*pm*/,
37  EdgeColorMap &e_cm,
38  edge_descriptor edge_to_color,
39  typename boost::property_traits< EdgeColorMap >::value_type color)
40 {
41  put(e_cm, edge_to_color, color);
42 }
43 
49 template<
50  typename HalfedgeGraph,
51  typename PointMap,
52  typename VertexColorMap,
53  typename vertex_descriptor =
55 void
56 color_vertex(HalfedgeGraph &/*g*/,
57  PointMap &/*pm*/,
58  VertexColorMap &v_cm,
59  vertex_descriptor vertex_to_color,
60  typename boost::property_traits<VertexColorMap>::value_type color)
61 {
62  put(v_cm, vertex_to_color, color);
63 }
64 
65 } // namespace Filters
66 } // namespace FEVV
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
Geometry_traits.h
FEVV::Filters::color_edge
void color_edge(HalfedgeGraph &, PointMap &, EdgeColorMap &e_cm, edge_descriptor edge_to_color, typename boost::property_traits< EdgeColorMap >::value_type color)
Colors an edge by putting the specified color into the edge color map at the "edge" position....
Definition: apply_color.h:36
msdm2::vertex_descriptor
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
Definition: msdm2_surfacemesh.h:33
FEVV::put
void put(FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key, const FEVV::PCLPointCloudPointMap::value_type &value)
Specialization of put(point_map, key, value) for PCLPointCloud.
Definition: Graph_properties_pcl_point_cloud.h:126
properties.h
FEVV::Filters::color_vertex
void color_vertex(HalfedgeGraph &, PointMap &, VertexColorMap &v_cm, vertex_descriptor vertex_to_color, typename boost::property_traits< VertexColorMap >::value_type color)
Colors a vertex by putting the specified color into the vertex color map at the "vertex" position....
Definition: apply_color.h:56