- const set<Block *> &blocks = layout.get_blocks();
- for(set<Block *>::const_iterator i=blocks.begin(); i!=blocks.end(); ++i)
- if((*i)->get_sensor_id()==addr)
- reset_block_color(**i);
-}
-
-void Engineer::block_reserved(const Block &block, const Train *)
-{
- reset_block_color(block);
-}
-
-Track *Engineer::pick_track(int x, int y)
-{
- const GL::Vector3 &start = camera.get_position();
- float xx = x*2.0/window.get_width()-1.0;
- float yy = y*2.0/window.get_height()-1.0;
- GL::Vector4 ray = camera.unproject(GL::Vector4(xx, yy, 0, 0));
-
- return layout.pick_track(Vector(start.x, start.y, start.z), Vector(ray.x, ray.y, ray.z));
+ Vehicle3D &loco3d = layout_3d.get<Vehicle3D>(train.get_vehicle(0));
+ overlay->set_label(loco3d, train.get_name());
+ train.signal_name_changed.connect(sigc::bind<0>(sigc::mem_fun(overlay, &Overlay3D::set_label), sigc::ref(loco3d)));