46    vector<LineSegment> m_polyline_list;
 
   47    vector<real_type>   m_s0;
 
   51    #ifdef CLOTHOIDS_USE_THREADS 
   52    mutable Utils::BinarySearch<integer> m_last_interval;
 
   54    mutable integer m_last_interval{0};
 
   57    mutable bool       m_aabb_done{
false};
 
   60    #ifdef CLOTHOIDS_USE_THREADS 
   61    mutable std::mutex m_aabb_mutex;
 
   65    reset_last_interval() {
 
   66      #ifdef CLOTHOIDS_USE_THREADS 
   68      integer & last_interval = *m_last_interval.search( std::this_thread::get_id(), ok );
 
   70      integer & last_interval = m_last_interval;
 
   81    { this->reset_last_interval(); }
 
   91    { this->reset_last_interval(); this->copy(PL); }
 
  105    { this->copy(s); 
return *
this; }
 
  112    { 
return integer(m_polyline_list.size()); }
 
  116    { 
return integer(m_s0.size()); }
 
  121    void push_back( LineSegment 
const & C );
 
  122    void push_back( CircleArc 
const & C, 
real_type tol );
 
  123    void push_back( Biarc 
const & C, 
real_type tol );
 
  124    void push_back( ClothoidCurve 
const & C, 
real_type tol );
 
  125    void push_back( ClothoidList 
const & L, 
real_type tol );
 
  134    void build( LineSegment 
const & L );
 
  135    void build( CircleArc 
const & C, 
real_type tol );
 
  136    void build( Biarc 
const & B, 
real_type tol );
 
  137    void build( ClothoidCurve 
const & C, 
real_type tol );
 
  138    void build( ClothoidList 
const & CL, 
real_type tol );
 
  140    void build( CircleArc 
const & C );
 
  141    void build( ClothoidCurve 
const & );
 
  142    void build( Biarc 
const & );
 
  143    void build( BiarcList 
const & );
 
  144    void build( PolyLine 
const & );
 
  145    void build( ClothoidList 
const & );
 
  146    void build( Dubins 
const & );
 
  147    void build( Dubins3p 
const & );
 
  176      vector<Triangle2D> & tvec,
 
  185      vector<Triangle2D> & tvec,
 
  194      vector<Triangle2D> & tvec,
 
 
  204    { 
return m_s0.back(); }
 
 
  211    { 
return m_polyline_list.front().x_begin(); }
 
 
  215    { 
return m_polyline_list.front().y_begin(); }
 
 
  219    { 
return m_polyline_list.back().x_end(); }
 
 
  223    { 
return m_polyline_list.back().y_end(); }
 
 
  227      integer idx = this->find_at_s( s );
 
  229      return m_polyline_list[size_t(idx)].X(s-ss);
 
 
  234      integer idx = this->find_at_s( s );
 
  235      return m_polyline_list.at(
size_t(idx)).m_c0;
 
 
  248      integer idx = this->find_at_s( s );
 
  250      return m_polyline_list[size_t(idx)].Y(s-ss);
 
 
  255      integer idx = this->find_at_s( s );
 
  256      return m_polyline_list[size_t(idx)].m_s0;
 
 
  278      integer idx = this->find_at_s( s );
 
  280      m_polyline_list[size_t(idx)].eval( s-ss, x, y );
 
 
  289      integer idx = this->find_at_s( s );
 
  291      m_polyline_list[size_t(idx)].eval_D( s-ss, x_D, y_D );
 
 
  308    { x_DDD = y_DDD = 0; }
 
 
  319      integer idx{ this->find_at_s( s ) };
 
  321      m_polyline_list[size_t(idx)].eval_ISO( s-ss, offs, x, y );
 
 
  331      integer idx{ this->find_at_s( s ) };
 
  333      m_polyline_list[size_t(idx)].eval_ISO_D( s-ss, offs, x_D, y_D );
 
 
  352    { x_DDD = y_DDD = 0; }
 
 
  364      for ( 
auto & il : m_polyline_list ) il.translate( 
tx, 
ty );
 
 
  373      for ( 
auto & il : m_polyline_list ) il.rotate( angle, cx, cy );
 
 
  430    collision( 
PolyLine const & C ) 
const;
 
  440    collision( 
BaseCurve const * pC ) 
const override;
 
  467      vector<real_type> & ss0,
 
  468      vector<real_type> & ss1
 
  517    { stream << info(); }
 
 
  524    build_AABBtree() 
const;
 
  526#ifdef CLOTHOIDS_BACK_COMPATIBILITY 
  527#include "PolyLine_compatibility.hxx" 
 
Definition BaseCurve.hxx:192
virtual real_type tx(real_type s) const
virtual real_type ty(real_type s) const
Definition BiarcList.hxx:42
Definition Clothoid.hxx:48
Definition ClothoidList.hxx:861
Class to manage a collection of straight segment.
Definition PolyLine.hxx:42
real_type length() const override
Definition PolyLine.hxx:203
real_type X_D(real_type s) const override
Definition PolyLine.hxx:233
real_type X_DD(real_type) const override
Definition PolyLine.hxx:239
void bb_triangles(vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/6, real_type max_size=1e100, integer icurve=0) const override
Definition PolyLine.cc:294
real_type x_begin() const override
Definition PolyLine.hxx:210
real_type x_end() const override
Definition PolyLine.hxx:218
CurveType type() const override
Definition PolyLine.hxx:102
void eval_ISO(real_type s, real_type offs, real_type &x, real_type &y) const override
Definition PolyLine.hxx:313
void eval_DDD(real_type, real_type &x_DDD, real_type &y_DDD) const override
Definition PolyLine.hxx:303
void intersect_ISO(real_type offs, PolyLine const &pl, real_type offs_pl, IntersectList &ilist) const
Definition PolyLine.cc:961
void eval_ISO_DDD(real_type, real_type, real_type &x_DDD, real_type &y_DDD) const override
Definition PolyLine.hxx:346
void eval_ISO_DD(real_type, real_type, real_type &x_DD, real_type &y_DD) const override
Definition PolyLine.hxx:337
real_type X_DDD(real_type) const override
Definition PolyLine.hxx:243
void bbox(real_type &xmin, real_type &ymin, real_type &xmax, real_type &ymax) const override
Definition PolyLine.cc:238
friend ostream_type & operator<<(ostream_type &stream, PolyLine const &P)
Definition PolyLine.cc:989
void scale(real_type sc) override
Definition PolyLine.cc:357
void intersect(PolyLine const &pl, vector< real_type > &ss0, vector< real_type > &ss1) const
Definition PolyLine.cc:903
real_type Y_D(real_type s) const override
Definition PolyLine.hxx:254
void eval_DD(real_type, real_type &x_DD, real_type &y_DD) const override
Definition PolyLine.hxx:295
real_type Y_DDD(real_type) const override
Definition PolyLine.hxx:264
real_type theta_D(real_type s) const override
Definition PolyLine.cc:331
void translate(real_type tx, real_type ty) override
translate curve by
Definition PolyLine.hxx:363
real_type Y(real_type s) const override
Definition PolyLine.hxx:247
void eval(real_type s, real_type &x, real_type &y) const override
Definition PolyLine.hxx:273
real_type theta_DD(real_type s) const override
Definition PolyLine.cc:337
void bbox_ISO(real_type, real_type &, real_type &, real_type &, real_type &) const override
Definition PolyLine.cc:275
void rotate(real_type angle, real_type cx, real_type cy) override
Definition PolyLine.hxx:368
void trim(real_type s_begin, real_type s_end) override
Definition PolyLine.cc:406
void reverse() override
Definition PolyLine.cc:374
void change_origin(real_type newx0, real_type newy0) override
Definition PolyLine.cc:395
void info(ostream_type &stream) const override
Definition PolyLine.hxx:516
real_type Y_DD(real_type) const override
Definition PolyLine.hxx:260
real_type X(real_type s) const override
Definition PolyLine.hxx:226
integer closest_point_ISO(real_type x, real_type y, real_type &X, real_type &Y, real_type &S, real_type &T, real_type &DST) const override
Definition PolyLine.cc:767
real_type y_begin() const override
Definition PolyLine.hxx:214
real_type y_end() const override
Definition PolyLine.hxx:222
real_type length_ISO(real_type) const override
Definition PolyLine.cc:150
real_type theta_DDD(real_type s) const override
Definition PolyLine.cc:343
void eval_D(real_type s, real_type &x_D, real_type &y_D) const override
Definition PolyLine.hxx:284
void bb_triangles_SAE(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/6, real_type max_size=1e100, integer icurve=0) const override
Definition PolyLine.hxx:192
real_type theta(real_type s) const override
Definition PolyLine.cc:323
void bb_triangles_ISO(real_type offs, vector< Triangle2D > &tvec, real_type max_angle=Utils::m_pi/6, real_type max_size=1e100, integer icurve=0) const override
Definition PolyLine.cc:308
void eval_ISO_D(real_type s, real_type offs, real_type &x_D, real_type &y_D) const override
Definition PolyLine.hxx:325
Utils::AABBtree< real_type > AABB_TREE
AABB tree type
Definition Clothoids.hh:81
GC_namespace::GenericContainer GenericContainer
Generic container object.
Definition Clothoids.hh:84
std::basic_ostream< char > ostream_type
output streaming
Definition Clothoids.hh:78
std::vector< Ipair > IntersectList
Vector of pair of two real number.
Definition BaseCurve.hxx:36
enum class CurveType :integer { LINE, POLYLINE, CIRCLE, BIARC, BIARC_LIST, CLOTHOID, CLOTHOID_LIST, DUBINS, DUBINS3P } CurveType
Definition Clothoids.hh:89
double real_type
real type number
Definition Clothoids.hh:79
int integer
integer type number
Definition Clothoids.hh:80