2 #include <boost/geometry/geometries/register/ring.hpp>
32 struct point_order<
lanelet::Polygon3d> {
33 static const order_selector value = clockwise;
36 struct closure<
lanelet::Polygon3d> {
37 static const closure_selector value = open;
42 struct point_order<
lanelet::ConstPolygon3d> {
43 static const order_selector value = clockwise;
46 struct closure<
lanelet::ConstPolygon3d> {
47 static const closure_selector value = open;
53 static const order_selector value = clockwise;
56 struct closure<
lanelet::Polygon2d> {
57 static const closure_selector value = open;
62 struct point_order<
lanelet::ConstPolygon2d> {
63 static const order_selector value = clockwise;
66 struct closure<
lanelet::ConstPolygon2d> {
67 static const closure_selector value = open;
72 struct point_order<
lanelet::BasicPolygon2d> {
73 static const order_selector value = clockwise;
76 struct closure<
lanelet::BasicPolygon2d> {
77 static const closure_selector value = open;
82 struct point_order<
lanelet::BasicPolygon3d> {
83 static const order_selector value = clockwise;
86 struct closure<
lanelet::BasicPolygon3d> {
87 static const closure_selector value = open;
92 struct point_order<
lanelet::ConstHybridPolygon2d> {
93 static const order_selector value = clockwise;
96 struct closure<
lanelet::ConstHybridPolygon2d> {
97 static const closure_selector value = open;
102 struct point_order<
lanelet::ConstHybridPolygon3d> {
103 static const order_selector value = clockwise;
106 struct closure<
lanelet::ConstHybridPolygon3d> {
107 static const closure_selector value = open;
111 struct point_order<
lanelet::CompoundHybridPolygon2d> {
112 static const order_selector value = clockwise;
115 struct closure<
lanelet::CompoundHybridPolygon2d> {
116 static const closure_selector value = open;
121 struct point_order<
lanelet::CompoundHybridPolygon3d> {
122 static const order_selector value = clockwise;
125 struct closure<
lanelet::CompoundHybridPolygon3d> {
126 static const closure_selector value = open;
131 struct point_order<
lanelet::CompoundPolygon2d> {
132 static const order_selector value = clockwise;
135 struct closure<
lanelet::CompoundPolygon2d> {
136 static const closure_selector value = open;
141 struct point_order<
lanelet::CompoundPolygon3d> {
142 static const order_selector value = clockwise;
145 struct closure<
lanelet::CompoundPolygon3d> {
146 static const closure_selector value = open;
155 using type = polygon_tag;
192 using type = polygon_tag;
231 using boost::geometry::area;
232 using boost::geometry::within;
240 template <
typename Polygon3dT>
241 IfPoly<Polygon3dT, double>
distanceToBorder3d(
const Polygon3dT& poly1,
const Polygon3dT& poly2);
248 template <
typename Polygon3dT>
249 IfPoly<Polygon3dT, BoundingBox3d>
boundingBox3d(
const Polygon3dT& polygon);
251 template <
typename Polygon2dT>
252 IfPoly<Polygon2dT, BoundingBox2d>
boundingBox2d(
const Polygon2dT& polygon);
254 template <
typename Polygon3dT>
255 IfPoly<Polygon3dT, BoundingBox3d>
boundingBox3d(
const Polygon3dT& polygon) {
256 static_assert(traits::is3D<Polygon3dT>(),
"Please call this function with a 3D type!");
258 for (
const auto&
p : polygon) {
264 template <
typename Polygon2dT>
265 IfPoly<Polygon2dT, BoundingBox2d>
boundingBox2d(
const Polygon2dT& polygon) {
266 static_assert(traits::is2D<Polygon2dT>(),
"Please call this function with a 2D type!");
268 for (
const auto&
p : polygon) {
274 template <
typename Polygon3dT>
276 const Polygon3dT& l2);
278 template <
typename PolygonT>
279 IfPoly<PolygonT, bool>
touches2d(
const PolygonT& poly1,
const PolygonT& poly2);
281 template <
typename Polygon2dT>
282 IfPoly<Polygon2dT, bool>
overlaps2d(
const Polygon2dT& poly1,
const Polygon2dT& poly2);
284 template <
typename Polygon3dT>
285 IfPoly<Polygon3dT, bool>
overlaps3d(
const Polygon3dT& poly1,
const Polygon3dT& poly2,
double heightTolerance);
299 template <
typename Polygon2dT>
300 IfPoly<Polygon2dT, BasicPolygons2d>
convexPartition(
const Polygon2dT& poly);
327 template <
typename Polygon2dT>
328 IfPoly<Polygon2dT, IndexedTriangles>
triangulate(
const Polygon2dT& poly);