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;
|
Polyhedron P;
|
||||||
|
std::ifstream in(argv[1]);
|
||||||
std::ifstream in("cube.off");
|
|
||||||
|
|
||||||
in >> P ;
|
in >> P ;
|
||||||
|
|
||||||
// associate indices to the vertices using the "id()" field of the vertex.
|
// 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;
|
Polyhedron P;
|
||||||
std::ifstream in("cube.off");
|
|
||||||
in >> P;
|
in >> P;
|
||||||
GraphTraits::vertex_iterator vi = vertices(P).first;
|
GraphTraits::vertex_iterator vi = vertices(P).first;
|
||||||
std::list<vertex_descriptor> V;
|
std::list<vertex_descriptor> V;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
cube.off
|
||||||
|
|
@ -69,18 +69,16 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
typedef boost::property_map<
|
typedef boost::property_map<
|
||||||
Polyhedron,
|
Polyhedron,
|
||||||
CGAL::face_index_t
|
CGAL::face_index_t
|
||||||
>::const_type Face_index_map;
|
>::const_type Face_index_map;
|
||||||
|
|
||||||
|
std::ifstream in(argv[1]);
|
||||||
Polyhedron P;
|
Polyhedron P;
|
||||||
{
|
|
||||||
std::ifstream in("cube.off");
|
|
||||||
in >> P ;
|
in >> P ;
|
||||||
}
|
|
||||||
|
|
||||||
// initialize facet indices
|
// initialize facet indices
|
||||||
std::size_t i = 0;
|
std::size_t i = 0;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
Polyhedron P;
|
||||||
std::cin >> P;
|
in >> P;
|
||||||
GraphTraits::vertex_descriptor vd = *(vertices(P).first);
|
GraphTraits::vertex_descriptor vd = *(vertices(P).first);
|
||||||
|
|
||||||
typedef boost::transform_iterator<Source<Polyhedron>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
typedef boost::transform_iterator<Source<Polyhedron>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue