mirror of https://github.com/CGAL/cgal
Propagate namespace change in examples
This commit is contained in:
parent
a5bb805d31
commit
20efa0bb5d
|
|
@ -21,7 +21,7 @@ int main(int /* argc */, char* argv[])
|
|||
Mesh sm;
|
||||
std::ifstream in(argv[1]);
|
||||
in >> sm;
|
||||
Mesh::Property_map<vertex_descriptor,vertex_descriptor> predecessor;
|
||||
CGAL::Properties::Property_map<vertex_descriptor,vertex_descriptor> predecessor;
|
||||
predecessor = sm.add_property_map<vertex_descriptor,vertex_descriptor>("v:predecessor").first;
|
||||
|
||||
boost::prim_minimum_spanning_tree(sm, predecessor, boost::root_vertex(*vertices(sm).first));
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
std::ifstream in2((argc>2)?argv[2]:"data/quad.off");
|
||||
|
||||
Mesh::Property_map<vertex_descriptor,std::string> name1, name2;
|
||||
CGAL::Properties::Property_map<vertex_descriptor,std::string> name1, name2;
|
||||
bool created;
|
||||
sm1.add_property_map<vertex_descriptor,int>("v:weight",7812);
|
||||
boost::tie(name1, created) = sm1.add_property_map<vertex_descriptor,std::string>("v:name","hello");
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ int main()
|
|||
}
|
||||
|
||||
// The status of being used or removed is stored in a property map
|
||||
Mesh::Property_map<Mesh::Vertex_index,bool> removed
|
||||
CGAL::Properties::Property_map<Mesh::Vertex_index,bool> removed
|
||||
= m.property_map<Mesh::Vertex_index,bool>("v:removed").first;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ int main()
|
|||
|
||||
|
||||
// give each vertex a name, the default is empty
|
||||
Mesh::Property_map<vertex_descriptor,std::string> name;
|
||||
CGAL::Properties::Property_map<vertex_descriptor,std::string> name;
|
||||
bool created;
|
||||
boost::tie(name, created) = m.add_property_map<vertex_descriptor,std::string>("v:name","");
|
||||
assert(created);
|
||||
|
|
@ -36,20 +36,20 @@ int main()
|
|||
|
||||
{
|
||||
// You get an existing property, and created will be false
|
||||
Mesh::Property_map<vertex_descriptor,std::string> name;
|
||||
CGAL::Properties::Property_map<vertex_descriptor,std::string> name;
|
||||
bool created;
|
||||
boost::tie(name, created) = m.add_property_map<vertex_descriptor,std::string>("v:name", "");
|
||||
assert(! created);
|
||||
}
|
||||
|
||||
// You can't get a property that does not exist
|
||||
Mesh::Property_map<face_descriptor,std::string> gnus;
|
||||
CGAL::Properties::Property_map<face_descriptor,std::string> gnus;
|
||||
bool found;
|
||||
boost::tie(gnus, found) = m.property_map<face_descriptor,std::string>("v:gnus");
|
||||
assert(! found);
|
||||
|
||||
// retrieve the point property for which exists a convenience function
|
||||
Mesh::Property_map<vertex_descriptor, K::Point_3> location = m.points();
|
||||
CGAL::Properties::Property_map<vertex_descriptor, K::Point_3> location = m.points();
|
||||
BOOST_FOREACH( vertex_descriptor vd, m.vertices()) {
|
||||
std::cout << name[vd] << " @ " << location[vd] << std::endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue