for(iter=bline_point_list.begin();iter!=bline_point_list.end();++iter)
if(*iter==value_node)
{
- list<ValueNode_Const::Handle>::iterator prev(iter);
- --prev;
-
BLinePoint bline_point;
-
BLinePoint next_bline_point((*iter)->get_value().get(BLinePoint()));
BLinePoint prev_bline_point;
- if(iter!=bline_point_list.begin())
- {
- prev_bline_point=(*prev)->get_value().get(BLinePoint());
- }
- else
+ list<ValueNode_Const::Handle>::iterator prev(iter);
+ if(iter==bline_point_list.begin())
{
- prev_bline_point.set_vertex(Point(0,0));
- prev_bline_point.set_width(next_bline_point.get_width());
- prev_bline_point.set_origin(0.5);
- prev_bline_point.set_split_tangent_flag(false);
+ assert(loop_);
+ prev = bline_point_list.end();
}
+ prev--;
+
+ prev_bline_point=(*prev)->get_value().get(BLinePoint());
- etl::hermite<Vector> curve(prev_bline_point.get_vertex(),next_bline_point.get_vertex(),prev_bline_point.get_tangent2(),next_bline_point.get_tangent1());
+ etl::hermite<Vector> curve(prev_bline_point.get_vertex(),
+ next_bline_point.get_vertex(),
+ prev_bline_point.get_tangent2(),
+ next_bline_point.get_tangent1());
etl::derivative< etl::hermite<Vector> > deriv(curve);
bline_point.set_vertex(curve(origin));