- else if(mode==MANIPULATE)
- manipulator.button_press(x, y, ground.x, ground.y, btn);
- else if(mode==MEASURE)
- measure.button_press(x, y, ground.x, ground.y, btn);
-}
-
-void Designer::pointer_motion(int x, int y)
-{
- y = window.get_height()-y-1;
-
- if(!root->get_child_at(x, y))
- {
- Point ground = map_pointer_coords(x, y);
- manipulator.pointer_motion(x, y, ground.x, ground.y);
- measure.pointer_motion(x, y, ground.x, ground.y);
- }
-}
-
-void Designer::apply_camera()
-{
- if(mode==CATALOGUE)
- {
- GL::matrix_mode(GL::PROJECTION);
- GL::load_identity();
- GL::frustum_centered(0.11046, 0.082843, 0.1, 10);
- GL::matrix_mode(GL::MODELVIEW);
- GL::load_identity();
- GL::translate(0, 0, -1);
- }
- else
- camera.apply();