30 if(b==
nullptr||b->
m_path==
nullptr)
return;
42 if(count>=Nmax-1 || (k==M-1))
46 figure->
plot(ss.str(),Xt,Yt,
z,count,options);
60 if(
right->isCenterLine())
65 std::vector<double> tristrip;
70 int imax =
left->m_path->getData().nc()-1;
71 int jmax =
right->m_path->getData().nc()-1;
72 double xl0,yl0,xr0,yr0,xl1,yl1,xr1,yr1;
75 xl0 =
left->m_path->getData()(1,i);
76 yl0 =
left->m_path->getData()(2,i);
77 xr0 =
right->m_path->getData()(1,j);
78 yr0 =
right->m_path->getData()(2,j);
80 tristrip.push_back(xl0);
81 tristrip.push_back(yl0);
82 tristrip.push_back(xr0);
83 tristrip.push_back(yr0);
85 if(i==imax && j==jmax)
break;
87 xl1 =
left->m_path->getData()(1,i<imax?i+1:i);
88 yl1 =
left->m_path->getData()(2,i<imax?i+1:i);
89 xr1 =
right->m_path->getData()(1,j<jmax?j+1:j);
90 yr1 =
right->m_path->getData()(2,j<jmax?j+1:j);
104 double ddij = (xl1-xr1)*(xl1-xr1)+(yl1-yr1)*(yl1-yr1);
105 double ddi = (xl1-xr0)*(xl1-xr0)+(yl1-yr0)*(yl1-yr0);
106 double ddj = (xl0-xr1)*(xl0-xr1)+(yl0-yr1)*(yl0-yr1);
107 if(ddij<=ddi && ddij<=ddj)
134 for(
int k=0;k<tristrip.size();k+=4)
136 Xt[count] = tristrip[k];
137 Yt[count] = tristrip[k+1];
138 Xt[count+1] = tristrip[k+2];
139 Yt[count+1] = tristrip[k+3];
141 if(count>=Nmax-1 || (k==tristrip.size()-4))
143 std::stringstream ss;
145 figure->
tristrip(name+
"/h",Xt,Yt,
z+0.2,count,options);
159 std::stringstream ss;
160 ss <<
"FillColor=" << std::max<double>(std::min<double>(1,normedCost),0) <<
"," << std::min<double>(std::max<double>(0,1-normedCost),1) <<
",0.0";
165 std::string str =
"";
166 switch(
right->m_type)
170 str =
"FillColor=0.8,0.8,0.8";
175 str =
"FillColor=1.0,0.5,0.15";
180 str =
"FillColor=1,1,1";
185 str =
"FillColor=0.75,0,0";
196 for(
auto it=borderSet.
getAllBorders();it.first!=it.second;it.first++)
239 std::string options =
"";
243 switch(
right->m_type)
275 adoreMatrix<double,4L,0L> *r_data;
276 adoreMatrix<double,4L,0L> *l_data;
279 r_data = &(
right->m_path->getData());
280 n =
right->m_path->getData().nc();
284 l_data = &(
left->m_path->getData());
285 m =
left->m_path->getData().nc();
323 double Xt[max_points];
324 double Yt[max_points];
325 double rightsmin =
right->m_path->limitLo();
326 double rightsmax =
right->m_path->limitHi();
327 double leftsmin =
left->m_path->limitLo();
328 double leftsmax =
left->m_path->limitHi();
329 int k = max_points/2;
332 double sright = rightsmin + (rightsmax-rightsmin)/(
double)(k-1)*(
double)i;
336 sleft = leftsmin + (leftsmax-leftsmin)/(
double)(k-1)*(
double)i;
340 sleft = leftsmax - (leftsmax-leftsmin)/(
double)(k-1)*(
double)i;
342 auto rightpos =
right->m_path->f(sright);
343 auto leftpos =
left->m_path->f(sleft);
344 Xt[i*2+0] = rightpos(0);
345 Xt[i*2+1] = leftpos(0);
346 Yt[i*2+0] = rightpos(1);
347 Yt[i*2+1] = leftpos(1);
349 figure->
tristrip(name+
"/h",Xt,Yt,
z,k*2,options);
Definition: laneplot_config.h:24
std::string lane_fill_driveable_plotoptions
Definition: laneplot_config.h:28
std::string border_outer_left_plotoptions
Definition: laneplot_config.h:26
std::string lane_fill_emergency_plotoptions
Definition: laneplot_config.h:29
std::string lane_fill_default_plotoptions
Definition: laneplot_config.h:31
std::string border_outer_right_plotoptions
Definition: laneplot_config.h:27
std::string lane_fill_other_plotoptions
Definition: laneplot_config.h:30
efficiently store borders in boost R-tree
Definition: borderset.h:99
BorderIteratorPair2 getAllBorders()
get all borders in this
Definition: borderset.h:356
Border * getBorder(const BorderID &id) const
retrieve a border by ID
Definition: borderset.h:628
adoreMatrix< T, n+1, 0 > & getData()
Definition: llinearpiecewisefunction.h:147
static const int max_size_points
Definition: plcommands.h:24
void plotBorder_fancy(std::string name, adore::env::BorderBased::Border *right, adore::env::BorderBased::Border *left, double z, bool outlineLeft, bool outlineRight, adore::PLOT::LanePlotConfig config, DLR_TS::PlotLab::AFigureStub *figure)
plots a border object, including left neighbor if !=0 into figure object
Definition: plot_border.h:234
void plotBorderSet(adore::env::BorderBased::BorderSet &borderSet, DLR_TS::PlotLab::AFigureStub *figure)
Definition: plot_border.h:194
void plotBorderNavigation(adore::env::BorderBased::Border *right, adore::env::BorderBased::Border *left, double normedCost, DLR_TS::PlotLab::AFigureStub *figure)
Definition: plot_border.h:157
void plotBorderLine(std::string name, std::string options, adore::env::BorderBased::Border *b, double z, DLR_TS::PlotLab::AFigureStub *figure)
Definition: plot_border.h:28
void plotBorder(std::string name, adore::env::BorderBased::Border *right, adore::env::BorderBased::Border *left, double z, std::string options, DLR_TS::PlotLab::AFigureStub *figure, bool plotarrows=false)
Definition: plot_border.h:58
void unPlotBorder(adore::env::BorderBased::BorderID rightId, DLR_TS::PlotLab::AFigureStub *figure)
Definition: plot_border.h:210
@ OTHER
Definition: border.h:38
@ EMERGENCY
Definition: border.h:41
@ DRIVING
Definition: border.h:39
@ right
Definition: indicator_hint.h:36
@ left
Definition: indicator_hint.h:35
z
Definition: adore_set_goal.py:32
Definition: areaofeffectconverter.h:20
This struct identifies a Border by the coordinates of the starting and the end point.
Definition: borderid.h:31
std::string toString() const
Write information of the BorderID to a string.
Definition: borderid.h:131
The border struct contains data of the smallest.
Definition: border.h:62
@ SAME_DIRECTION
Definition: border.h:507
Tborderpath * m_path
Definition: border.h:70
BorderID * m_left
Definition: border.h:69