mirror of https://github.com/CGAL/cgal
Switch to BGL API
In order to switch to Surface_mesh, we still have to find a solution for Box_with_handle, as the descriptor is an index and not a handle.
This commit is contained in:
parent
65688132cc
commit
c4abaab0a3
|
|
@ -1,34 +1,22 @@
|
|||
#undef NDEBUG
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
|
||||
#include <CGAL/Self_intersection_polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_3 Point;
|
||||
typedef K::Triangle_3 Triangle;
|
||||
typedef CGAL::Polyhedron_3<K> Polyhedron;
|
||||
//typedef CGAL::Surface_mesh<K::Point_3> Polyhedron;
|
||||
typedef CGAL::Polyhedron_3<K> Polyhedron;
|
||||
typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
|
||||
|
||||
|
||||
int main(int, char** argv) {
|
||||
std::ifstream input(argv[1]);
|
||||
Polyhedron poly;
|
||||
#if 0
|
||||
typedef boost::property_map<Polyhedron, CGAL::vertex_point_t>::type Ppmap;
|
||||
Ppmap point = get(CGAL::vertex_point_t(),poly);
|
||||
Point p = point[*vertices(poly).first];
|
||||
|
||||
#else
|
||||
|
||||
if ( !input || !(input >> poly) ){
|
||||
std::cerr << "Error: can not read file.";
|
||||
|
|
@ -51,6 +39,6 @@ int main(int, char** argv) {
|
|||
|
||||
std::cerr << "Is self-intersection test took " << timer.time() << " sec." << std::endl;
|
||||
std::cerr << (intersecting_2 ? "There is a self-intersection." : "There is no self-intersection.") << std::endl;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue