-
Notifications
You must be signed in to change notification settings - Fork 1
/
cpp11.cpp
91 lines (86 loc) · 4.98 KB
/
cpp11.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Generated by cpp11: do not edit by hand
// clang-format off
#include "cpp11/declarations.hpp"
#include <R_ext/Visibility.h>
// add_detail.cpp
SEXP poly_add_detail(SEXP poly, cpp11::integers c, cpp11::doubles l, cpp11::integers n, bool use_l, bool use_n);
extern "C" SEXP _boundaries_poly_add_detail(SEXP poly, SEXP c, SEXP l, SEXP n, SEXP use_l, SEXP use_n) {
BEGIN_CPP11
return cpp11::as_sexp(poly_add_detail(cpp11::as_cpp<cpp11::decay_t<SEXP>>(poly), cpp11::as_cpp<cpp11::decay_t<cpp11::integers>>(c), cpp11::as_cpp<cpp11::decay_t<cpp11::doubles>>(l), cpp11::as_cpp<cpp11::decay_t<cpp11::integers>>(n), cpp11::as_cpp<cpp11::decay_t<bool>>(use_l), cpp11::as_cpp<cpp11::decay_t<bool>>(use_n)));
END_CPP11
}
// corner_clip.cpp
SEXP poly_corner_cutting(SEXP poly, cpp11::doubles max_angle, cpp11::doubles max_cut, cpp11::integers n_cut);
extern "C" SEXP _boundaries_poly_corner_cutting(SEXP poly, SEXP max_angle, SEXP max_cut, SEXP n_cut) {
BEGIN_CPP11
return cpp11::as_sexp(poly_corner_cutting(cpp11::as_cpp<cpp11::decay_t<SEXP>>(poly), cpp11::as_cpp<cpp11::decay_t<cpp11::doubles>>(max_angle), cpp11::as_cpp<cpp11::decay_t<cpp11::doubles>>(max_cut), cpp11::as_cpp<cpp11::decay_t<cpp11::integers>>(n_cut)));
END_CPP11
}
// minkowski.cpp
SEXP polygon_minkowski_offset(SEXP polygons, SEXP offset, cpp11::integers n, double eps);
extern "C" SEXP _boundaries_polygon_minkowski_offset(SEXP polygons, SEXP offset, SEXP n, SEXP eps) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_minkowski_offset(cpp11::as_cpp<cpp11::decay_t<SEXP>>(polygons), cpp11::as_cpp<cpp11::decay_t<SEXP>>(offset), cpp11::as_cpp<cpp11::decay_t<cpp11::integers>>(n), cpp11::as_cpp<cpp11::decay_t<double>>(eps)));
END_CPP11
}
// minkowski.cpp
SEXP polygon_minkowski_sum(SEXP p, SEXP q);
extern "C" SEXP _boundaries_polygon_minkowski_sum(SEXP p, SEXP q) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_minkowski_sum(cpp11::as_cpp<cpp11::decay_t<SEXP>>(p), cpp11::as_cpp<cpp11::decay_t<SEXP>>(q)));
END_CPP11
}
// simplify.cpp
SEXP poly_simplify(SEXP poly, int cost, int stop, double cost_par, double stop_par);
extern "C" SEXP _boundaries_poly_simplify(SEXP poly, SEXP cost, SEXP stop, SEXP cost_par, SEXP stop_par) {
BEGIN_CPP11
return cpp11::as_sexp(poly_simplify(cpp11::as_cpp<cpp11::decay_t<SEXP>>(poly), cpp11::as_cpp<cpp11::decay_t<int>>(cost), cpp11::as_cpp<cpp11::decay_t<int>>(stop), cpp11::as_cpp<cpp11::decay_t<double>>(cost_par), cpp11::as_cpp<cpp11::decay_t<double>>(stop_par)));
END_CPP11
}
// skeleton.cpp
SEXP polygon_skeleton_offset(SEXP polygons, SEXP offset);
extern "C" SEXP _boundaries_polygon_skeleton_offset(SEXP polygons, SEXP offset) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_skeleton_offset(cpp11::as_cpp<cpp11::decay_t<SEXP>>(polygons), cpp11::as_cpp<cpp11::decay_t<SEXP>>(offset)));
END_CPP11
}
// skeleton.cpp
SEXP polygon_skeleton_polylineset(SEXP polygons, bool keep_boundary, bool only_inner);
extern "C" SEXP _boundaries_polygon_skeleton_polylineset(SEXP polygons, SEXP keep_boundary, SEXP only_inner) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_skeleton_polylineset(cpp11::as_cpp<cpp11::decay_t<SEXP>>(polygons), cpp11::as_cpp<cpp11::decay_t<bool>>(keep_boundary), cpp11::as_cpp<cpp11::decay_t<bool>>(only_inner)));
END_CPP11
}
// skeleton.cpp
SEXP polygon_skeleton_limit(SEXP polygons);
extern "C" SEXP _boundaries_polygon_skeleton_limit(SEXP polygons) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_skeleton_limit(cpp11::as_cpp<cpp11::decay_t<SEXP>>(polygons)));
END_CPP11
}
// skeleton.cpp
SEXP polygon_skeleton_limit_location(SEXP polygons);
extern "C" SEXP _boundaries_polygon_skeleton_limit_location(SEXP polygons) {
BEGIN_CPP11
return cpp11::as_sexp(polygon_skeleton_limit_location(cpp11::as_cpp<cpp11::decay_t<SEXP>>(polygons)));
END_CPP11
}
extern "C" {
static const R_CallMethodDef CallEntries[] = {
{"_boundaries_poly_add_detail", (DL_FUNC) &_boundaries_poly_add_detail, 6},
{"_boundaries_poly_corner_cutting", (DL_FUNC) &_boundaries_poly_corner_cutting, 4},
{"_boundaries_poly_simplify", (DL_FUNC) &_boundaries_poly_simplify, 5},
{"_boundaries_polygon_minkowski_offset", (DL_FUNC) &_boundaries_polygon_minkowski_offset, 4},
{"_boundaries_polygon_minkowski_sum", (DL_FUNC) &_boundaries_polygon_minkowski_sum, 2},
{"_boundaries_polygon_skeleton_limit", (DL_FUNC) &_boundaries_polygon_skeleton_limit, 1},
{"_boundaries_polygon_skeleton_limit_location", (DL_FUNC) &_boundaries_polygon_skeleton_limit_location, 1},
{"_boundaries_polygon_skeleton_offset", (DL_FUNC) &_boundaries_polygon_skeleton_offset, 2},
{"_boundaries_polygon_skeleton_polylineset", (DL_FUNC) &_boundaries_polygon_skeleton_polylineset, 3},
{NULL, NULL, 0}
};
}
extern "C" attribute_visible void R_init_boundaries(DllInfo* dll){
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
R_forceSymbols(dll, TRUE);
}