mirror of https://github.com/CGAL/cgal
Fix compilation of mesh_polyhedral_domain.cpp with Polyhedron_3
This commit is contained in:
parent
ebf8db64e9
commit
578889e801
|
|
@ -154,6 +154,25 @@ struct Polyhedron_property_map<CGAL::face_patch_id_t<CGAL::Tag_true> >
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Compatibility: when the `Patch_id` template argument of
|
||||||
|
// `Polyhedron_mesh_domain` is `Tag_false` (because that argument was named
|
||||||
|
// `UsePatchId` in previous versions of CGAL.
|
||||||
|
template <>
|
||||||
|
struct Polyhedron_property_map<CGAL::face_patch_id_t<CGAL::Tag_false> >
|
||||||
|
: public Polyhedron_property_map<CGAL::face_patch_id_t<void> >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class Gt, class I, CGAL_HDS_PARAM_, class A>
|
||||||
|
typename boost::lazy_enable_if<
|
||||||
|
internal::has_Plane_3<Gt>,
|
||||||
|
internal::Get_static_property_map<Gt, I, HDS, A>
|
||||||
|
>::type
|
||||||
|
get(CGAL::face_patch_id_t<Tag_false>, const Polyhedron_3<Gt,I,HDS,A>& p)
|
||||||
|
{
|
||||||
|
return get(CGAL::face_patch_id_t<void>(), p);
|
||||||
|
}
|
||||||
|
|
||||||
struct Polyhedron_num_feature_edges_pmap {
|
struct Polyhedron_num_feature_edges_pmap {
|
||||||
typedef void key_type;
|
typedef void key_type;
|
||||||
typedef int value_type;
|
typedef int value_type;
|
||||||
|
|
|
||||||
|
|
@ -880,7 +880,6 @@ detect_features(FT angle_in_degree,
|
||||||
BOOST_FOREACH(Polyhedron_type& p, poly)
|
BOOST_FOREACH(Polyhedron_type& p, poly)
|
||||||
{
|
{
|
||||||
PIDMap pid_map = get(face_patch_id_t<Patch_id>(), p);
|
PIDMap pid_map = get(face_patch_id_t<Patch_id>(), p);
|
||||||
VIPMap vip_map = get(vertex_incident_patches_t<Patch_id>(), p);
|
|
||||||
EIFMap eif = get(CGAL::edge_is_feature, p);
|
EIFMap eif = get(CGAL::edge_is_feature, p);
|
||||||
const std::size_t polyhedron_id = &p - &poly[0];
|
const std::size_t polyhedron_id = &p - &poly[0];
|
||||||
BOOST_FOREACH(face_descriptor f, faces(p))
|
BOOST_FOREACH(face_descriptor f, faces(p))
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@
|
||||||
#include <CGAL/Mesh_3/global_parameters.h>
|
#include <CGAL/Mesh_3/global_parameters.h>
|
||||||
#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
|
#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
|
||||||
|
|
||||||
#include <CGAL/boost/graph/Graph_with_descriptor_with_graph.h>
|
#include <CGAL/Mesh_3/properties_Polyhedron_3.h>
|
||||||
#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
|
|
||||||
|
|
||||||
#include <CGAL/Side_of_triangle_mesh.h>
|
#include <CGAL/Side_of_triangle_mesh.h>
|
||||||
#include <CGAL/AABB_tree.h>
|
#include <CGAL/AABB_tree.h>
|
||||||
|
|
@ -53,6 +52,8 @@
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
#include <boost/mpl/vector.hpp>
|
#include <boost/mpl/vector.hpp>
|
||||||
#include <boost/mpl/contains.hpp>
|
#include <boost/mpl/contains.hpp>
|
||||||
|
#include <boost/mpl/or.hpp>
|
||||||
|
#include <boost/type_traits/is_same.hpp>
|
||||||
#include <CGAL/tuple.h>
|
#include <CGAL/tuple.h>
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
|
|
@ -188,8 +189,8 @@ public:
|
||||||
struct Primitive {
|
struct Primitive {
|
||||||
typedef typename boost::graph_traits<P>::face_descriptor face_descriptor_t;
|
typedef typename boost::graph_traits<P>::face_descriptor face_descriptor_t;
|
||||||
|
|
||||||
const P* graph;
|
|
||||||
face_descriptor_t face_descriptor;
|
face_descriptor_t face_descriptor;
|
||||||
|
const P* graph;
|
||||||
|
|
||||||
typedef Triangle_from_face_descriptor_map<P> Triangle_pmap;
|
typedef Triangle_from_face_descriptor_map<P> Triangle_pmap;
|
||||||
typedef One_point_from_face_descriptor_map<P> Point_pmap;
|
typedef One_point_from_face_descriptor_map<P> Point_pmap;
|
||||||
|
|
@ -223,18 +224,37 @@ public:
|
||||||
typedef Primitive<P> type;
|
typedef Primitive<P> type;
|
||||||
|
|
||||||
static Surface_patch_index get_index(const typename type::Id primitive_id) {
|
static Surface_patch_index get_index(const typename type::Id primitive_id) {
|
||||||
return get(get(face_patch_id_t<Surface_patch_index>(),
|
return get(get(face_patch_id_t<Patch_id>(),
|
||||||
*primitive_id.graph),
|
*primitive_id.graph),
|
||||||
primitive_id.face_descriptor);
|
primitive_id.face_descriptor);
|
||||||
}
|
}
|
||||||
};
|
}; // Primitive_type (for non-Polyhedron_3)
|
||||||
|
|
||||||
template <typename P> struct Primitive_type<P, true> {
|
template <typename P> struct Primitive_type<P, true> {
|
||||||
typedef AABB_face_graph_triangle_primitive<P > type;
|
typedef AABB_face_graph_triangle_primitive<P > type;
|
||||||
|
|
||||||
static Surface_patch_index get_index(const typename type::Id face_handle) {
|
static Surface_patch_index get_index(const typename type::Id face_handle,
|
||||||
return face_handle->patch_id();
|
Tag_false)
|
||||||
|
{
|
||||||
|
typename boost::property_map<P, face_patch_id_t<Patch_id> >::type pmap;
|
||||||
|
return get(pmap, face_handle);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
static Surface_patch_index get_index(const typename type::Id,
|
||||||
|
Tag_true)
|
||||||
|
{
|
||||||
|
return Surface_patch_index(0,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Surface_patch_index get_index(const typename type::Id face_handle)
|
||||||
|
{
|
||||||
|
namespace m = boost::mpl;
|
||||||
|
return get_index(face_handle,
|
||||||
|
Boolean_tag<m::or_<boost::is_same<Patch_id, void>,
|
||||||
|
boost::is_same<Patch_id, Tag_false>
|
||||||
|
>::value>());
|
||||||
|
}
|
||||||
|
}; // Primitive_type specialized for CGAL::Polyehdron_3
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename Primitive_type<Polyhedron>::type Ins_fctor_primitive;
|
typedef typename Primitive_type<Polyhedron>::type Ins_fctor_primitive;
|
||||||
|
|
|
||||||
|
|
@ -463,11 +463,11 @@ detect_features(FT angle_in_degree, std::vector<Polyhedron>& poly)
|
||||||
face_ids[f] = id++;
|
face_ids[f] = id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename boost::property_map<Polyhedron,CGAL::face_patch_id_t<Patch_id> >::type PIDMap;
|
typedef typename boost::property_map<Polyhedron,CGAL::face_patch_id_t<Tag_> >::type PIDMap;
|
||||||
typedef typename boost::property_map<Polyhedron,CGAL::vertex_incident_patches_t<P_id> >::type VIPMap;
|
typedef typename boost::property_map<Polyhedron,CGAL::vertex_incident_patches_t<P_id> >::type VIPMap;
|
||||||
typedef typename boost::property_map<Polyhedron, CGAL::edge_is_feature_t>::type EIFMap;
|
typedef typename boost::property_map<Polyhedron, CGAL::edge_is_feature_t>::type EIFMap;
|
||||||
|
|
||||||
PIDMap pid_map = get(face_patch_id_t<Patch_id>(), p);
|
PIDMap pid_map = get(face_patch_id_t<Tag_>(), p);
|
||||||
VIPMap vip_map = get(vertex_incident_patches_t<P_id>(), p);
|
VIPMap vip_map = get(vertex_incident_patches_t<P_id>(), p);
|
||||||
EIFMap eif_map = get(CGAL::edge_is_feature, p);
|
EIFMap eif_map = get(CGAL::edge_is_feature, p);
|
||||||
|
|
||||||
|
|
@ -572,8 +572,8 @@ add_featured_edges_to_graph(const Polyhedron& p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef typename boost::property_map<Polyhedron,face_patch_id_t<Patch_id> >::type Face_patch_id_pmap;
|
typedef typename boost::property_map<Polyhedron,face_patch_id_t<Tag_> >::type Face_patch_id_pmap;
|
||||||
Face_patch_id_pmap fpm = get(face_patch_id_t<Patch_id>(),p);
|
Face_patch_id_pmap fpm = get(face_patch_id_t<Tag_>(),p);
|
||||||
|
|
||||||
BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){
|
BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){
|
||||||
vertex_descriptor vs = p2vmap[get(vpm,source(e,graph))];
|
vertex_descriptor vs = p2vmap[get(vpm,source(e,graph))];
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,13 @@ namespace CGAL {
|
||||||
template <typename K, typename V>
|
template <typename K, typename V>
|
||||||
class Static_property_map
|
class Static_property_map
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
typedef K key_type;
|
typedef K key_type;
|
||||||
typedef V value_type;
|
typedef V value_type;
|
||||||
typedef const V& reference;
|
typedef const V& reference;
|
||||||
typedef boost::read_write_property_map_tag category;
|
typedef boost::read_write_property_map_tag category;
|
||||||
|
|
||||||
|
private:
|
||||||
V v;
|
V v;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue