slight changes

This commit is contained in:
Peter Hachenberger 2008-07-05 21:57:49 +00:00
parent 45c997bb59
commit 52a4f35a25
1 changed files with 7 additions and 6 deletions

View File

@ -17,12 +17,11 @@
// //
// Author(s) : Peter Hachenberger <hachenberger@mpi-sb.mpg.de> // Author(s) : Peter Hachenberger <hachenberger@mpi-sb.mpg.de>
#include <CGAL/basic.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h> #include <CGAL/Polyhedron_3.h>
#include <CGAL/Nef_polyhedron_3.h> #include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h> #include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include<CGAL/Nef_3/SNC_indexed_items.h> #include <CGAL/Nef_3/SNC_indexed_items.h>
#include <CGAL/convex_decomposition_3.h> #include <CGAL/convex_decomposition_3.h>
#include <list> #include <list>
@ -31,16 +30,18 @@ typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3;
typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3; typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3;
typedef Nef_polyhedron_3::Volume_const_iterator Volume_const_iterator; typedef Nef_polyhedron_3::Volume_const_iterator Volume_const_iterator;
int main(int argc, char* argv[]) { int main() {
Nef_polyhedron_3 N; Nef_polyhedron_3 N;
std::cin >> N; std::cin >> N;
CGAL::convex_decomposition_3<Nef_polyhedron_3>(N); CGAL::convex_decomposition_3(N);
std::list<Polyhedron_3> convex_parts; std::list<Polyhedron_3> convex_parts;
Volume_const_iterator ci; // the first volumes is the outer volume, which is
for(ci = ++N.volumes_begin(); ci != N.volumes_end(); ++ci) { // ignored in the decomposition
Volume_const_iterator ci = ++N.volumes_begin();
for( ; ci != N.volumes_end(); ++ci) {
if(ci->mark()) { if(ci->mark()) {
Polyhedron_3 P; Polyhedron_3 P;
N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P); N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P);