/Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids.hh Source File

Clothoids: /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids.hh Source File
Clothoids
Clothoids.hh
1/*--------------------------------------------------------------------------*\
2 | |
3 | Copyright (C) 2018 |
4 | |
5 | , __ , __ |
6 | /|/ \ /|/ \ |
7 | | __/ _ ,_ | __/ _ ,_ |
8 | | \|/ / | | | | \|/ / | | | |
9 | |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
10 | /| /| |
11 | \| \| |
12 | |
13 | Paolo Bevilacqua and Enrico Bertolazzi |
14 | |
15 | (1) Dipartimento di Ingegneria e Scienza dell'Informazione |
16 | (2) Dipartimento di Ingegneria Industriale |
17 | |
18 | Universita` degli Studi di Trento |
19 | email: paolo.bevilacqua@unitn.it |
20 | email: enrico.bertolazzi@unitn.it |
21 | |
22\*--------------------------------------------------------------------------*/
23
27
28#pragma once
29
30#ifndef CLOTHOIDS_dot_HH
31#define CLOTHOIDS_dot_HH
32
33// comment to disable threads support
34#define CLOTHOIDS_USE_THREADS 1
35
36#ifdef NO_SYSTEM_UTILS
37 #include "Utils.hh"
38 #include "Utils_AABB_tree.hh"
39#else
40 #include <Utils.hh>
41 #include <Utils_AABB_tree.hh>
42#endif
43
44#include "GenericContainer/GenericContainer.hh"
45
46#include <string>
47#include <fstream>
48#include <iostream>
49#include <iomanip>
50#include <cmath>
51
52#include <vector>
53#include <map>
54#include <utility>
55#include <algorithm>
56#include <iterator>
57
58#include <memory> // shared_ptr
59
60#ifdef G2LIB_DEBUG
61 #define G2LIB_DEBUG_MESSAGE(...) std::cout << fmt::format(__VA_ARGS__) << std::flush
62#else
63 #define G2LIB_DEBUG_MESSAGE(...)
64#endif
65
66#ifndef GLIB2_TOL_ANGLE
67 #define GLIB2_TOL_ANGLE 1e-8
68#endif
69
70namespace G2lib {
71
72 using std::string;
73 using std::vector;
74 using std::map;
75 using std::set;
76
77 using istream_type = std::basic_istream<char>;
78 using ostream_type = std::basic_ostream<char>;
79 using real_type = double;
80 using integer = int;
81 using AABB_TREE = Utils::AABBtree<real_type>;
82 using AABB_SET = Utils::AABBtree<real_type>::AABB_SET;
83 using AABB_MAP = Utils::AABBtree<real_type>::AABB_MAP;
84 using GenericContainer = GC_namespace::GenericContainer;
85
89 using CurveType = enum class CurveType : integer {
90 LINE,
91 POLYLINE,
92 CIRCLE,
93 BIARC,
94 BIARC_LIST,
95 CLOTHOID,
96 CLOTHOID_LIST,
97 DUBINS,
98 DUBINS3P
99 };
100
104 inline
105 string
107 string res{""};
108 switch ( n ) {
109 case CurveType::LINE: res = "LINE"; break;
110 case CurveType::POLYLINE: res = "POLYLINE"; break;
111 case CurveType::CIRCLE: res = "CIRCLE"; break;
112 case CurveType::BIARC: res = "BIARC"; break;
113 case CurveType::BIARC_LIST: res = "BIARC_LIST"; break;
114 case CurveType::CLOTHOID: res = "CLOTHOID"; break;
115 case CurveType::CLOTHOID_LIST: res = "CLOTHOID_LIST"; break;
116 case CurveType::DUBINS: res = "DUBINS"; break;
117 case CurveType::DUBINS3P: res = "DUBINS3P"; break;
118 }
119 return res;
120 };
121
130
131 class LineSegment;
132 class CircleArc;
133 class Biarc;
134 class ClothoidCurve;
135 class PolyLine;
136 class BiarcList;
137 class ClothoidList;
138 class Dubins;
139 class Dubins3p;
140}
141
142#include "Clothoids/G2lib.hxx"
143#include "Clothoids/Triangle2D.hxx"
144#include "Clothoids/BBox.hxx"
145#include "Clothoids/BaseCurve.hxx"
146#include "Clothoids/Fresnel.hxx"
147#include "Clothoids/Line.hxx"
148#include "Clothoids/Circle.hxx"
149#include "Clothoids/Biarc.hxx"
150#include "Clothoids/Clothoid.hxx"
151#include "Clothoids/PolyLine.hxx"
152#include "Clothoids/BiarcList.hxx"
153#include "Clothoids/ClothoidList.hxx"
154#include "Clothoids/ClothoidAsyPlot.hxx"
155#include "Clothoids/Dubins.hxx"
156#include "Clothoids/Dubins3p.hxx"
157
158#endif
159
Definition Biarc.hxx:39
Definition BiarcList.hxx:42
Definition Circle.hxx:37
Definition Clothoid.hxx:48
Definition ClothoidList.hxx:861
Definition Dubins3p.hxx:78
Definition Dubins.hxx:74
Definition Line.hxx:37
Class to manage a collection of straight segment.
Definition PolyLine.hxx:42
Definition BBox.cc:42
Utils::AABBtree< real_type > AABB_TREE
AABB tree type
Definition Clothoids.hh:81
Utils::AABBtree< real_type >::AABB_SET AABB_SET
Set type used in AABB tree object.
Definition Clothoids.hh:82
GC_namespace::GenericContainer GenericContainer
Generic container object.
Definition Clothoids.hh:84
string to_string(CurveType n)
Definition Clothoids.hh:106
std::basic_ostream< char > ostream_type
output streaming
Definition Clothoids.hh:78
Utils::AABBtree< real_type >::AABB_MAP AABB_MAP
Map type used in AABB tree object.
Definition Clothoids.hh:83
CurveType curve_promote(CurveType A, CurveType B)
enum class CurveType :integer { LINE, POLYLINE, CIRCLE, BIARC, BIARC_LIST, CLOTHOID, CLOTHOID_LIST, DUBINS, DUBINS3P } CurveType
Definition Clothoids.hh:89
std::basic_istream< char > istream_type
input streaming
Definition Clothoids.hh:77
double real_type
real type number
Definition Clothoids.hh:79
int integer
integer type number
Definition Clothoids.hh:80