- Track3D &t3d = layout_3d->get_track(**i);
- if(route && route->has_track(**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);
+ Track3D &t3d = layout_3d->get<Track3D>(**i);
+ Path3D *path = new Path3D(t3d);
+ path->set_color(GL::Color(0.5, 0.8, 1.0));
+ if(unsigned tid = (*i)->get_turnout_id())
+ path->set_path(route.get_turnout(tid));
+ }
+}
+
+void Designer::show_zone(const Zone &zone)
+{
+ clear_paths();
+
+ const Zone::TrackSet &ztracks = zone.get_tracks();
+ for(Zone::TrackSet::const_iterator i=ztracks.begin(); i!=ztracks.end(); ++i)
+ {
+ Track3D &t3d = layout_3d->get<Track3D>(**i);
+ Path3D *path = new Path3D(t3d);
+ path->set_color(GL::Color(0.8, 1.0, 0.5));