Loading [MathJax]/jax/output/HTML-CSS/config.js
 
CGAL 6.0 - 2D Convex Hulls and Extreme Points
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Loading...
Searching...
No Matches
Convex_hull_2/array_convex_hull_2.cpp
#include <iostream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/convex_hull_2.h>
typedef K::Point_2 Point_2;
int main()
{
Point_2 points[5] = { Point_2(0,0), Point_2(10,0), Point_2(10,10), Point_2(6,5), Point_2(4,1) };
Point_2 result[5];
Point_2 *ptr = CGAL::convex_hull_2( points, points+5, result );
std::cout << ptr - result << " points on the convex hull:" << std::endl;
for(int i = 0; i < ptr - result; i++){
std::cout << result[i] << std::endl;
}
return 0;
}
OutputIterator convex_hull_2(InputIterator first, InputIterator beyond, OutputIterator result, const Traits &ch_traits)
generates the counterclockwise sequence of extreme points of the points in the range [first,...