- 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);
-}
-
-Track3D *Engineer::pick_track(int x, int y)
-{
- float view_height = tan(camera.get_field_of_view()/2)*2;
- float xx = ((float(x)-window.get_width()/2)/window.get_height())*view_height;
- float yy = (float(y)/window.get_height()-0.5)*view_height;
- float size = 4.0/window.get_height()*view_height;
-
- camera.apply();
+ const GL::Vector3 &start = camera.get_position();
+ GL::Vector4 ray = camera.unproject(GL::Vector4(p.x, p.y, 0, 0));