Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

cutting-1.cc

00001 #include <cutting/Polyhedron_Interval.h>
00002 
00003 
00004 typedef CGAL::Point_3<Exact_rep>   ExactPoint;
00005 typedef Polyhedron::Point          Point;
00006 typedef CGAL::Plane_3<Exact_rep>   Plane;
00007 typedef Polyhedron::Facet          Facet;
00008 typedef Polyhedron::Halfedge       Halfedge;
00009 
00010 
00011 ostream& operator<< ( ostream& os, Facet* fp )
00012 {
00013     if ( fp == 0 )
00014         return os << "NULL";
00015 
00016     return os << *fp;
00017 }
00018     
00019 
00020 
00021 void trial( const Point& a, const Point& b, const Point& c )
00022 {
00023     Polyhedron poly;
00024     poly.make_triangle(a,b,c);
00025     Facet& facet = *(poly.facets_begin());
00026 
00027     cout << "Polyhedron (before): " << endl
00028          << poly << endl;
00029 
00030     // Cut with slab between x=2 and x=12
00031     FacetTriple ft = cutting( poly, facet, 0, 10,100 );
00032 
00033     cout << "Polyhedron (after): " << endl
00034          << poly << endl;
00035 
00036     cout << "Low facet:" << endl
00037          << ft.low << endl << endl
00038          << "Middle facet:" << endl
00039          << ft.middle << endl << endl
00040          << "High facet:" << endl
00041          << ft.high << endl << endl;
00042 }
00043 
00044 
00045 
00046 int main()
00047 {
00048     CGAL::set_pretty_mode( cout );
00049 
00050     Point a( 0,0,0 );
00051     Point b( 15,3,0 );
00052     Point c( 25,0,0 );
00053 
00054     trial( a,b,c );
00055     //trial( a,c,b );
00056 
00057     return 0;
00058 }
00059 
00060 
00061 
00062 void switchon()
00063 {
00064     CORE::Expr e(3.3);
00065     e.approx();
00066 }

Generated on Fri Oct 26 23:38:07 2001 for bicobj-intersection by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001