+
+void Designer::show_route(const Route &route)
+{
+ const set<Track *> <racks = layout->get_tracks();
+ const set<const Track *> &rtracks = route.get_tracks();
+ for(set<Track *>::iterator i=ltracks.begin(); i!=ltracks.end(); ++i)
+ {
+ Track3D &t3d = layout_3d->get_track(**i);
+ if(rtracks.count(*i))
+ {
+ t3d.get_path().set_color(GL::Color(0.5, 0.8, 1.0));
+ if((*i)->get_type().is_turnout())
+ {
+ unsigned tid = (*i)->get_turnout_id();
+ int path = (tid ? route.get_turnout(tid) : -1);
+ if(path>=0)
+ t3d.get_path().set_path(path);
+ else
+ t3d.get_path().set_mask((*i)->get_type().get_paths());
+ }
+ else
+ t3d.get_path().set_path(0);
+ }
+ else
+ t3d.get_path().set_mask(0);
+ }
+}