#include <CGAL/dd_geo/chull_traits_3.h>
| |
== R::RT, coordinate ring type used for calculations.
| |
| |
== CGAL_Point_3<R>, point type.
| |
| |
== CGAL_Point_3<R>, internal point type.
| |
| |
== CGAL_Plane_3<R>, hyperplane type.
| |
| |
== CGAL_Vector_3<R>, internal vector type.
| |
| |
== CGAL_Ray_3<R>, internal ray type.
|
#include <CGAL/Homogeneous.h> #include <CGAL/chull_traits_3.h> #include <LEP/dd_geo/chull.h> #include <CGAL/point_generators_3.h> #include <CGAL/copy_n.h> #include <vector.h> typedef CGAL_Homogeneous< double > RepCls; typedef CGAL_chull_traits_3< RepCls > ChullTraits; typedef chull< ChullTraits > ChullType; typedef ChullTraits::POINT Point; typedef CGAL_Creator_uniform_3<double,Point> PointCreator; int main() { /* generate 250 points randomly on a sphere of radius 100.0 */ CGAL_Random_points_in_sphere_3< Point, PointCreator> gen(100.0); vector<Point> V; /* and copy them to a vector */ CGAL_copy_n( gen, 250, back_inserter(V) ); /* compute their convex hull */ ChullType CH(3); vector<Point>::iterator it; for (it = V.begin(); it != V.end(); ++it) CH.insert(*it); return 0; }