- 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)));