CGAL 5.2.2 - 3D Boolean Operations on Nef Polyhedra
Nef_3/draw_nef_3.cpp
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/draw_nef_3.h>
#include <fstream>
#include <iostream>
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
int main(int argc, char *argv[])
{
// read OFF file into a polyhedron
Polyhedron P;
std::ifstream ifs((argc > 1) ? argv[1] : "data/cross.off");
ifs >> P;
// initialize nef from polyhedron
Nef_polyhedron N(P);
// draw Nef Polyhedron
return EXIT_SUCCESS;
}