MEPP2 Project
properties_linear_cell_complex.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 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 #pragma once
12 
16 
17 
18 #define CGAL_LCC_TEMPLATE_ARGS \
19  unsigned int d_, unsigned int ambient_dim, class Traits_, class Items_, \
20  class Alloc_, \
21  template< unsigned int, class, class, class, class > \
22  class CMap, class Storage_
23 
24 #define CGAL_LCC_TYPE \
25  CGAL::Linear_cell_complex_for_combinatorial_map< d_, \
26  ambient_dim, \
27  Traits_, \
28  Items_, \
29  Alloc_, \
30  CMap, \
31  Storage_ >
32 
33 
34 namespace FEVV {
35 
36 
37 // _PMap_traits specialization for CGAL::Linear_cell_complex
38 // use boost::vector_property_map
39 
40 
41 // define default property map type (associative property map,
42 // vector property map...) for each cell type (vertex, face...) ;
43 
44 // default vertex property map
45 template< typename ValueT, CGAL_LCC_TEMPLATE_ARGS >
47 {
48  typedef typename boost::property_map< CGAL_LCC_TYPE,
49  boost::vertex_index_t >::const_type
51  typedef typename boost::vector_property_map< ValueT, vertex_index_map_type >
53 
54  static pmap_type create(const CGAL_LCC_TYPE &m)
55  {
56  auto index_map = get(boost::vertex_index, m);
57  pmap_type pmap(index_map);
58  return pmap;
59  }
60 };
61 
62 
63 // default face property map
64 template< typename ValueT, CGAL_LCC_TEMPLATE_ARGS >
66 {
67  typedef typename boost::property_map< CGAL_LCC_TYPE,
68  boost::face_index_t >::const_type
70  typedef typename boost::vector_property_map< ValueT, face_index_map_type >
72 
73  static pmap_type create(const CGAL_LCC_TYPE &m)
74  {
75  auto index_map = get(boost::face_index, m);
76  pmap_type pmap(index_map);
77  return pmap;
78  }
79 };
80 
81 // default edge property map
82 template< typename ValueT, CGAL_LCC_TEMPLATE_ARGS >
84 {
85  typedef typename boost::property_map< CGAL_LCC_TYPE,
86  boost::edge_index_t >::const_type
88  typedef typename boost::vector_property_map< ValueT, edge_index_map_type >
90 
91  static pmap_type create(const CGAL_LCC_TYPE &m)
92  {
93  auto index_map = get(boost::edge_index, m);
94  pmap_type pmap(index_map);
95  return pmap;
96  }
97 };
98 
99 // default halfedge property map
100 template< typename ValueT, CGAL_LCC_TEMPLATE_ARGS >
102 {
103  typedef typename boost::property_map< CGAL_LCC_TYPE,
104  boost::halfedge_index_t >::const_type
106  typedef typename boost::vector_property_map< ValueT, halfedge_index_map_type >
108 
109  static pmap_type create(const CGAL_LCC_TYPE &m)
110  {
111  auto index_map = get(boost::halfedge_index, m);
112  pmap_type pmap(index_map);
113  return pmap;
114  }
115 };
116 
117 
118 // define standard property map types for (property,cell) pair,
119 // for example vertex-normal
120 
121 // specialize the property maps traits for vertex-normal
122 template< CGAL_LCC_TEMPLATE_ARGS >
124 {
128 
129  static pmap_type create(const CGAL_LCC_TYPE &m)
130  {
131  auto index_map = get(boost::vertex_index, m);
132  pmap_type pmap(index_map);
133  return pmap;
134  }
135 };
136 
137 // specialize the property maps traits for vertex-tangent
138 template< CGAL_LCC_TEMPLATE_ARGS >
140 {
144 
145  static pmap_type create(const CGAL_LCC_TYPE &m)
146  {
147  auto index_map = get(boost::vertex_index, m);
148  pmap_type pmap(index_map);
149  return pmap;
150  }
151 };
152 
153 // specialize the property maps traits for vertex-texcoord
154 template< CGAL_LCC_TEMPLATE_ARGS >
156 {
160 
161  static pmap_type create(const CGAL_LCC_TYPE &m)
162  {
163  auto index_map = get(boost::vertex_index, m);
164  pmap_type pmap(index_map);
165  return pmap;
166  }
167 };
168 
169 // specialize the standard property map for vertex-color
170 template< CGAL_LCC_TEMPLATE_ARGS >
172 {
176 
177  static pmap_type create(const CGAL_LCC_TYPE &m)
178  {
179  auto index_map = get(boost::vertex_index, m);
180  pmap_type pmap(index_map);
181  return pmap;
182  }
183 };
184 
185 // specialize the property maps traits for vertex-custom_vector
186 template< CGAL_LCC_TEMPLATE_ARGS >
188 {
192 
193  static pmap_type create(const CGAL_LCC_TYPE &m)
194  {
195  auto index_map = get(boost::vertex_index, m);
196  pmap_type pmap(index_map);
197  return pmap;
198  }
199 };
200 
201 // specialize the property maps traits for vertex-custom_vector_color
202 template< CGAL_LCC_TEMPLATE_ARGS >
204 {
208 
209  static pmap_type create(const CGAL_LCC_TYPE &m)
210  {
211  auto index_map = get(boost::vertex_index, m);
212  pmap_type pmap(index_map);
213  return pmap;
214  }
215 };
216 
217 // specialize the property maps traits for vertex-custom_vector_param
218 template< CGAL_LCC_TEMPLATE_ARGS >
220 {
224 
225  static pmap_type create(const CGAL_LCC_TYPE &m)
226  {
227  auto index_map = get(boost::vertex_index, m);
228  pmap_type pmap(index_map);
229  return pmap;
230  }
231 };
232 
233 // specialize the property maps traits for halfedge-normal
234 template< CGAL_LCC_TEMPLATE_ARGS >
236 {
240 
241  static pmap_type create(const CGAL_LCC_TYPE &m)
242  {
243  auto index_map = get(boost::halfedge_index, m);
244  pmap_type pmap(index_map);
245  return pmap;
246  }
247 };
248 
249 // specialize the property maps traits for halfedge-texcoord
250 template< CGAL_LCC_TEMPLATE_ARGS >
252 {
256 
257  static pmap_type create(const CGAL_LCC_TYPE &m)
258  {
259  auto index_map = get(boost::halfedge_index, m);
260  pmap_type pmap(index_map);
261  return pmap;
262  }
263 };
264 
265 // specialize the property maps traits for edge-color
266 template< CGAL_LCC_TEMPLATE_ARGS >
268 {
272 
273  static pmap_type create(const CGAL_LCC_TYPE &m)
274  {
275  auto index_map = get(boost::edge_index, m);
276  pmap_type pmap(index_map);
277  return pmap;
278  }
279 };
280 
281 // specialize the property maps traits for face-normal
282 template< CGAL_LCC_TEMPLATE_ARGS >
284 {
288 
289  static pmap_type create(const CGAL_LCC_TYPE &m)
290  {
291  auto index_map = get(boost::face_index, m);
292  pmap_type pmap(index_map);
293  return pmap;
294  }
295 };
296 
297 // specialize the property maps traits for face-color
298 template< CGAL_LCC_TEMPLATE_ARGS >
300 {
304 
305  static pmap_type create(const CGAL_LCC_TYPE &m)
306  {
307  auto index_map = get(boost::face_index, m);
308  pmap_type pmap(index_map);
309  return pmap;
310  }
311 };
312 
313 // specialize the property maps traits for face-material
314 template< CGAL_LCC_TEMPLATE_ARGS >
316 {
317  typedef size_t value_type;
320 
321  static pmap_type create(const CGAL_LCC_TYPE &m)
322  {
323  auto index_map = get(boost::face_index, m);
324  pmap_type pmap(index_map);
325  return pmap;
326  }
327 };
328 
329 } // namespace FEVV
330 
331 
332 #undef CGAL_LCC_TEMPLATE_ARGS
333 #undef CGAL_LCC_TYPE
334 
335 
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_color_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:301
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_texcoord_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:157
FEVV::face_normal_t
face_normal_t
Definition: properties.h:77
FEVV::Face_pmap_traits< CGAL_LCC_TYPE, ValueT >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:73
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_normal_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:285
FEVV::Halfedge_pmap_traits< CGAL_LCC_TYPE, ValueT >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:109
CGAL_LCC_TYPE
#define CGAL_LCC_TYPE
Definition: properties_linear_cell_complex.h:24
FEVV::face_color_t
face_color_t
Definition: properties.h:81
FEVV::Vertex_pmap_traits< CGAL_LCC_TYPE, ValueT >::vertex_index_map_type
boost::property_map< CGAL_LCC_TYPE, boost::vertex_index_t >::const_type vertex_index_map_type
Definition: properties_linear_cell_complex.h:50
FEVV::Edge_pmap_traits
Definition: properties.h:345
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_param_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:223
FEVV::edge_color_t
edge_color_t
Definition: properties.h:73
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_normal_t >::pmap_type
Halfedge_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:239
FEVV::Geometry_traits
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
Definition: Geometry_traits.h:162
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_tangent_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:141
FEVV::vertex_custom_vector_color_t
vertex_custom_vector_color_t
Definition: properties.h:57
FEVV::Face_pmap_traits< CGAL_LCC_TYPE, ValueT >::pmap_type
boost::vector_property_map< ValueT, face_index_map_type > pmap_type
Definition: properties_linear_cell_complex.h:71
FEVV::Edge_pmap_traits< CGAL_LCC_TYPE, ValueT >::pmap_type
boost::vector_property_map< ValueT, edge_index_map_type > pmap_type
Definition: properties_linear_cell_complex.h:89
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_normal_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:125
FEVV::face_material_t
face_material_t
Definition: properties.h:85
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_texcoord_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:253
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_color_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:177
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::edge_color_t >::pmap_type
Edge_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:271
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_texcoord_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:161
FEVV::vertex_normal_t
vertex_normal_t
Definition: properties.h:35
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_normal_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:237
FEVV::halfedge_texcoord_t
halfedge_texcoord_t
Definition: properties.h:69
FEVV::Assoc_property_map
Definition: properties.h:236
FEVV::Halfedge_pmap_traits< CGAL_LCC_TYPE, ValueT >::halfedge_index_map_type
boost::property_map< CGAL_LCC_TYPE, boost::halfedge_index_t >::const_type halfedge_index_map_type
Definition: properties_linear_cell_complex.h:105
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_color_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:305
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_normal_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:241
FEVV::get
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
Definition: Graph_properties_pcl_point_cloud.h:117
FEVV::vertex_tangent_t
vertex_tangent_t
Definition: properties.h:39
FEVV::Face_pmap_traits
Definition: properties.h:331
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:191
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_normal_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:127
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_color_t >::pmap_type
Face_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:303
FEVV::vertex_color_t
vertex_color_t
Definition: properties.h:47
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Vertex_pmap_traits
Definition: properties.h:315
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_normal_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:289
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_material_t >::pmap_type
Face_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:319
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_material_t >::value_type
size_t value_type
Definition: properties_linear_cell_complex.h:317
FEVV::Vertex_pmap_traits< CGAL_LCC_TYPE, ValueT >::pmap_type
boost::vector_property_map< ValueT, vertex_index_map_type > pmap_type
Definition: properties_linear_cell_complex.h:52
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_param_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:221
FEVV::vertex_custom_vector_param_t
vertex_custom_vector_param_t
Definition: properties.h:61
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_color_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:207
FEVV::Face_pmap_traits< CGAL_LCC_TYPE, ValueT >::face_index_map_type
boost::property_map< CGAL_LCC_TYPE, boost::face_index_t >::const_type face_index_map_type
Definition: properties_linear_cell_complex.h:69
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_color_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:175
FEVV::Edge_pmap_traits< CGAL_LCC_TYPE, ValueT >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:91
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_material_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:321
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_color_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:209
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_color_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:173
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::face_normal_t >::pmap_type
Face_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:287
FEVV::vertex_custom_vector_t
vertex_custom_vector_t
Definition: properties.h:53
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::edge_color_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:269
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:189
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_param_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:225
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::edge_color_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:273
Wrappings_cgal_linear_cell_complex.h
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_tangent_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:145
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_color_t >::value_type
FEVV::Geometry_traits< CGAL_LCC_TYPE >::Vector value_type
Definition: properties_linear_cell_complex.h:205
FEVV::Halfedge_pmap_traits
Definition: properties.h:359
FEVV::Halfedge_pmap_traits< CGAL_LCC_TYPE, ValueT >::pmap_type
boost::vector_property_map< ValueT, halfedge_index_map_type > pmap_type
Definition: properties_linear_cell_complex.h:107
FEVV::Edge_pmap_traits< CGAL_LCC_TYPE, ValueT >::edge_index_map_type
boost::property_map< CGAL_LCC_TYPE, boost::edge_index_t >::const_type edge_index_map_type
Definition: properties_linear_cell_complex.h:87
FEVV::_PMap_traits
Definition: properties.h:376
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_texcoord_t >::pmap_type
Halfedge_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:255
properties.h
FEVV::Vertex_pmap_traits< CGAL_LCC_TYPE, ValueT >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:54
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_custom_vector_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:193
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_texcoord_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:159
FEVV::vertex_texcoord_t
vertex_texcoord_t
Definition: properties.h:43
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_normal_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:129
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::vertex_tangent_t >::pmap_type
Vertex_pmap_traits< CGAL_LCC_TYPE, value_type >::pmap_type pmap_type
Definition: properties_linear_cell_complex.h:143
Geometry_traits_cgal_linear_cell_complex.h
FEVV::halfedge_normal_t
halfedge_normal_t
Definition: properties.h:65
FEVV::_PMap_traits< CGAL_LCC_TYPE, FEVV::halfedge_texcoord_t >::create
static pmap_type create(const CGAL_LCC_TYPE &m)
Definition: properties_linear_cell_complex.h:257