mirror of https://github.com/CGAL/cgal
slight changes
This commit is contained in:
parent
45c997bb59
commit
52a4f35a25
|
|
@ -17,12 +17,11 @@
|
|||
//
|
||||
// Author(s) : Peter Hachenberger <hachenberger@mpi-sb.mpg.de>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/Nef_polyhedron_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 <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 Nef_polyhedron_3::Volume_const_iterator Volume_const_iterator;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int main() {
|
||||
|
||||
Nef_polyhedron_3 N;
|
||||
std::cin >> N;
|
||||
|
||||
CGAL::convex_decomposition_3<Nef_polyhedron_3>(N);
|
||||
CGAL::convex_decomposition_3(N);
|
||||
std::list<Polyhedron_3> convex_parts;
|
||||
|
||||
Volume_const_iterator ci;
|
||||
for(ci = ++N.volumes_begin(); ci != N.volumes_end(); ++ci) {
|
||||
// the first volumes is the outer volume, which is
|
||||
// ignored in the decomposition
|
||||
Volume_const_iterator ci = ++N.volumes_begin();
|
||||
for( ; ci != N.volumes_end(); ++ci) {
|
||||
if(ci->mark()) {
|
||||
Polyhedron_3 P;
|
||||
N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P);
|
||||
|
|
|
|||
Loading…
Reference in New Issue