mirror of https://github.com/CGAL/cgal
use argc/argv to pass the argument
This commit is contained in:
parent
f531ee2fa9
commit
9170b0a866
|
|
@ -0,0 +1 @@
|
|||
cube.off
|
||||
|
|
@ -18,12 +18,10 @@ typedef boost::graph_traits<Polyhedron>::vertex_iterator vertex_iterator;
|
|||
|
||||
|
||||
|
||||
int main() {
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
Polyhedron P;
|
||||
|
||||
std::ifstream in("cube.off");
|
||||
|
||||
Polyhedron P;
|
||||
std::ifstream in(argv[1]);
|
||||
in >> P ;
|
||||
|
||||
// associate indices to the vertices using the "id()" field of the vertex.
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
cube.off
|
||||
|
|
@ -46,10 +46,10 @@ adjacent_vertices_V2(const Polyhedron& g,
|
|||
}
|
||||
|
||||
|
||||
int main()
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in(argv[1]);
|
||||
Polyhedron P;
|
||||
std::ifstream in("cube.off");
|
||||
in >> P;
|
||||
GraphTraits::vertex_iterator vi = vertices(P).first;
|
||||
std::list<vertex_descriptor> V;
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
cube.off
|
||||
|
|
@ -69,19 +69,17 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
|||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
typedef boost::property_map<
|
||||
Polyhedron,
|
||||
CGAL::face_index_t
|
||||
>::const_type Face_index_map;
|
||||
|
||||
std::ifstream in(argv[1]);
|
||||
Polyhedron P;
|
||||
{
|
||||
std::ifstream in("cube.off");
|
||||
in >> P ;
|
||||
}
|
||||
|
||||
in >> P ;
|
||||
|
||||
// initialize facet indices
|
||||
std::size_t i = 0;
|
||||
for(Polyhedron::Facet_iterator it = P.facets_begin(); it != P.facets_end(); ++it, ++i)
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
cube.off
|
||||
|
|
@ -38,10 +38,11 @@ struct Source {
|
|||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in(argv[1]);
|
||||
Polyhedron P;
|
||||
std::cin >> P;
|
||||
in >> P;
|
||||
GraphTraits::vertex_descriptor vd = *(vertices(P).first);
|
||||
|
||||
typedef boost::transform_iterator<Source<Polyhedron>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
||||
|
|
|
|||
Loading…
Reference in New Issue