mirror of https://github.com/CGAL/cgal
Add a get for a dynamic property map tag
This commit is contained in:
parent
62c70bd5e2
commit
9bc2bc123f
|
|
@ -606,8 +606,45 @@ get(const CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangula
|
||||||
{
|
{
|
||||||
return CGAL::Intrinsic_Delaunay_Triangulation_3::IDT_vertex_index_property_map<CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<TM,T,HCM,VPM,FIM,EIM,LA> >(idt);
|
return CGAL::Intrinsic_Delaunay_Triangulation_3::IDT_vertex_index_property_map<CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<TM,T,HCM,VPM,FIM,EIM,LA> >(idt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename TM,
|
||||||
|
typename T,
|
||||||
|
typename HCM,
|
||||||
|
typename VPM,
|
||||||
|
typename FIM,
|
||||||
|
typename EIM,
|
||||||
|
typename LA,
|
||||||
|
typename dT>
|
||||||
|
struct property_map<CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<TM,T,HCM,VPM,FIM,EIM,LA>,
|
||||||
|
CGAL::dynamic_vertex_property_t<dT> > {
|
||||||
|
typedef CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<TM,T,HCM,VPM,FIM,EIM,LA> IDT;
|
||||||
|
typedef typename property_map<TM, CGAL::dynamic_vertex_property_t<dT> >::type type;
|
||||||
|
typedef type const_type;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
template <typename TM,
|
||||||
|
typename T,
|
||||||
|
typename HCM,
|
||||||
|
typename VPM,
|
||||||
|
typename FIM,
|
||||||
|
typename EIM,
|
||||||
|
typename LA,
|
||||||
|
typename dT>
|
||||||
|
typename boost::property_map<TM, CGAL::dynamic_vertex_property_t<dT> >::const_type
|
||||||
|
get(const CGAL::dynamic_vertex_property_t<dT>& dvp,
|
||||||
|
const CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<TM,T,HCM,VPM,FIM,EIM,LA>& idt)
|
||||||
|
{
|
||||||
|
return get(dvp,idt.triangle_mesh());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
#endif CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
#endif CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,16 @@ typedef boost::property_map<BaseMesh, Halfedge_coordinate_tag >::type Halfedge_c
|
||||||
|
|
||||||
typedef CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<BaseMesh,Kernel, Halfedge_coordinate_map> Mesh;
|
typedef CGAL::Intrinsic_Delaunay_Triangulation_3::Intrinsic_Delaunay_Triangulation_3<BaseMesh,Kernel, Halfedge_coordinate_map> Mesh;
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::dynamic_vertex_property_t<double> Vertex_distance_tag;
|
typedef CGAL::dynamic_vertex_property_t<double> Vertex_distance_tag;
|
||||||
typedef boost::property_map<Mesh, Vertex_distance_tag >::type Vertex_distance_map;
|
typedef boost::property_map<Mesh, Vertex_distance_tag >::type Vertex_distance_map;
|
||||||
|
|
||||||
|
|
||||||
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
|
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
|
||||||
|
/*
|
||||||
typedef CGAL::Heat_method_3::Heat_method_3<Mesh,Kernel,Vertex_distance_map> Heat_method;
|
typedef CGAL::Heat_method_3::Heat_method_3<Mesh,Kernel,Vertex_distance_map> Heat_method;
|
||||||
typedef CGAL::Heat_method_3::Heat_method_Eigen_traits_3::SparseMatrix SparseMatrix;
|
typedef CGAL::Heat_method_3::Heat_method_Eigen_traits_3::SparseMatrix SparseMatrix;
|
||||||
|
*/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
void source_set_tests(Heat_method hm, const Mesh& sm)
|
void source_set_tests(Heat_method hm, const Mesh& sm)
|
||||||
|
|
@ -109,7 +112,10 @@ void check_no_update(const Mesh& sm, const Vertex_distance_map& original, const
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
BaseMesh bm;
|
BaseMesh bm;
|
||||||
Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),bm);
|
Halfedge_coordinate_map hcm;
|
||||||
|
Mesh sm(bm,hcm);
|
||||||
|
|
||||||
|
Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),sm);
|
||||||
bool idf = false;
|
bool idf = false;
|
||||||
|
|
||||||
std::ifstream in("data/pyramid0.off");
|
std::ifstream in("data/pyramid0.off");
|
||||||
|
|
@ -119,11 +125,7 @@ int main()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Halfedge_coordinate_map hcm;
|
|
||||||
Mesh sm(bm,hcm);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
//source set tests
|
//source set tests
|
||||||
Heat_method hm(sm, vertex_distance_map, idf);
|
Heat_method hm(sm, vertex_distance_map, idf);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue