- l = cat_layout_3d;
-
- float xx = ((float(x)-window.get_width()/2)/window.get_height())*0.82843;
- float yy = (float(y)/window.get_height()-0.5)*0.82843;
- float size = 4.0/window.get_height()*0.82843;
-
- apply_camera();
-
- return l->pick_track(xx, yy, size);
+ return catalogue.get_layout().pick_track(Vector(0, 0, 1), Vector(xx*0.05523, yy*0.042421, -0.1));
+ else
+ {
+ const GL::Vector3 &cpos = camera.get_position();
+ GL::Vector4 cray = camera.unproject(GL::Vector4(xx, yy, 0, 0));
+ return layout->pick_track(Vector(cpos.x, cpos.y, cpos.z), Vector(cray.x, cray.y, cray.z));
+ }