track->set_slope(0);
}
- for(set<Track *>::iterator i=neighbors.begin(); i!=neighbors.end(); ++i)
- (*i)->check_slope();
-
update_objects();
}
cur_z += dz;
}
- for(set<Track *>::iterator i=neighbors.begin(); i!=neighbors.end(); ++i)
- (*i)->check_slope();
-
update_objects();
}
i->object->set_rotation(i->rot);
}
- for(set<Track *>::iterator i=neighbors.begin(); i!=neighbors.end(); ++i)
- (*i)->check_slope();
-
for(vector<Track *>::iterator i=extend_tracks.begin(); i!=extend_tracks.end(); ++i)
delete *i;
extend_tracks.clear();
for(vector<MObject>::iterator i=objects.begin(); i!=objects.end(); ++i)
i->object->set_position(Vector(center.x+i->pos.x, center.y+i->pos.y, center.z+i->pos.z+dz));
-
- for(set<Track *>::iterator i=neighbors.begin(); i!=neighbors.end(); ++i)
- (*i)->check_slope();
}
else if(mode==EXTEND)
{
add("train", static_cast<void (Loader::*)(unsigned, unsigned, const std::string &)>(&Loader::train));
}
-void Layout::Loader::finish()
-{
- for(set<Track *>::iterator i=obj.tracks.begin(); i!=obj.tracks.end(); ++i)
- (*i)->check_slope();
-}
-
void Layout::Loader::route()
{
Route *rte = new Route(obj);
public:
Loader(Layout &);
private:
- virtual void finish();
void route();
void route(const std::string &);
void signal(ArticleNumber);
void Track::set_position(const Vector &p)
{
position = p;
+ for(vector<Track *>::const_iterator i=links.begin(); i!=links.end(); ++i)
+ if(*i)
+ (*i)->check_slope();
}
void Track::set_rotation(float r)
break_link(i);
links[i] = otrack;
otrack->links[j] = this;
+ check_slope();
layout.create_blocks(*this);
signal_link_changed.emit(i, otrack);
void set_flex(bool);
float get_slope() const { return slope; }
bool get_flex() const { return flex; }
+private:
void check_slope();
+public:
void set_turnout_id(unsigned);
void set_sensor_id(unsigned);
unsigned get_turnout_id() const { return turnout_id; }