-
Notifications
You must be signed in to change notification settings - Fork 4
/
Sample01.cpp
31 lines (24 loc) · 895 Bytes
/
Sample01.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Author: Andrea Casalino
* Created: 03.12.2019
*
* report any bug to [email protected].
**/
#include <Utils.h>
#include <iostream>
int main() {
// randomly sample a point cloud of a given number of points
auto cloud = sampleCloud(50);
// compute the convex hull of the cloud
std::vector<hull::Coordinate> convex_hull_normals;
auto convex_hull_facets_incidences =
qh::convex_hull(cloud.begin(), cloud.end(), to_hull_coordinate,
convex_hull_normals, qh::ConvexHullContext{});
// Log the result into a textual file, which can be visualized
// running the python script Plotter.py
logConvexhull(convex_hull_facets_incidences, convex_hull_normals, cloud,
"Sample01.json");
std::cout << "call '" << PYTHON_CMD
<< " Plotter.py --CH Sample01.json' to see results" << std::endl;
return EXIT_SUCCESS;
}