Move selection properties to the Polyhedron demo directory as it is demo specific

This commit is contained in:
Andreas Fabri 2017-05-31 16:05:24 +02:00
parent 4688a93c16
commit 4d27ea1cc5
5 changed files with 42 additions and 25 deletions

View File

@ -28,9 +28,7 @@ namespace CGAL
enum vertex_num_feature_edges_t { vertex_num_feature_edges };
enum halfedge_is_feature_t { halfedge_is_feature };
enum vertex_selection_t { vertex_selection};
enum edge_selection_t { edge_selection};
enum face_selection_t { face_selection};
enum vertex_time_stamp_t { vertex_time_stamp};
enum halfedge_time_stamp_t { halfedge_time_stamp};
enum face_time_stamp_t { face_time_stamp};

View File

@ -4,6 +4,7 @@
// CGAL
// kernel
#include "Kernel_type.h"
#include "properties.h"
// surface mesh
#include <CGAL/Polyhedron_3.h>

View File

@ -1,6 +1,8 @@
#ifndef SMESH_TYPE_H
#define SMESH_TYPE_H
#include "properties.h"
#include <CGAL/Surface_mesh/Surface_mesh.h>
#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
#include <CGAL/boost/graph/properties.h>
@ -15,4 +17,30 @@ typedef boost::graph_traits<SMesh>::face_descriptor face_descriptor;
typedef boost::graph_traits<SMesh>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<SMesh>::halfedge_descriptor halfedge_descriptor;
namespace boost {
template <typename P>
struct property_map<CGAL::Surface_mesh<P>, CGAL::vertex_selection_t>
{
typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor vertex_descriptor;
typedef typename CGAL::Surface_mesh<P>::template Property_map<vertex_descriptor, int> type;
typedef type const_type;
};
template <typename P>
struct property_map<CGAL::Surface_mesh<P>, CGAL::face_selection_t>
{
typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor face_descriptor;
typedef typename CGAL::Surface_mesh<P>::template Property_map<face_descriptor, int> type;
typedef type const_type;
};
} // namespace boost
#endif // SMESH_TYPE_H

View File

@ -0,0 +1,12 @@
#ifndef CGAL_POLYHEDRON_DEMO_PROPERTIES_H
#define CGAL_POLYHEDRON_DEMO_PROPERTIES_H
namespace CGAL {
enum vertex_selection_t { vertex_selection};
enum edge_selection_t { edge_selection};
enum face_selection_t { face_selection};
} // namespace CGAL
#endif

View File

@ -58,28 +58,6 @@ struct property_map<CGAL::Surface_mesh<P>, CGAL::halfedge_is_feature_t>
};
template <typename P>
struct property_map<CGAL::Surface_mesh<P>, CGAL::vertex_selection_t>
{
typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor vertex_descriptor;
typedef typename CGAL::Surface_mesh<P>::template Property_map<vertex_descriptor, int> type;
typedef type const_type;
};
template <typename P>
struct property_map<CGAL::Surface_mesh<P>, CGAL::face_selection_t>
{
typedef typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor face_descriptor;
typedef typename CGAL::Surface_mesh<P>::template Property_map<face_descriptor, int> type;
typedef type const_type;
};
template <typename P>
struct property_map<CGAL::Surface_mesh<P>, CGAL::vertex_num_feature_edges_t>
{